1. October 2020

How to display Debug Console with output from the application in Xcode

When you hit Build and Run button in Xcode the application will start.

If everything is ok you should see messages from the application displayed in the lower right part of Xcode window. The Console output contains text printed by the application.

Sometimes it might happen that there is no Console output window. How to fix it?

Here is small tip for Xcode developers.

To show/hide the Console click the icon Show/Hide the console in the lower right corner. It’s the last icon on the lower right side of the panel.

31. May 2017

How to debug C/C++ code in Android Studio

Android Studio has support for debugging Java and also C/C++ code. The problem is that in default configuration the debugger might not work. There is a quick way how to fix the issue.

Go to your application and select Edit Configurations…

Select tab Debugger and change Debug type to value Dual. Press Ok.

Android Studio will check installed packages and in the case of missing debugger it will prompt you to confirm the fix. Just click Yes.

After installation of necessary packages, the debugger will start and you’ll be able to debug even C/C++ code.

14. May 2013

How to debug :hover pseudo class in Google Chrome Developer tool

Google Chrome developer tool is simply one of the best tools available for debugging of HTML5 applications.

It has one neat feature: possibility to inspect CSS of element and editing it on the fly.

That works fine for normal styles, but what about :hover state?

There is one “hidden” option which allows to switch element to :hover state.

Inspect element of HTML. You should see Styles on the right hand side. There are 3 icons. Click the middle one with arrow sign. It will pop up menu with checkboxes. You can select here CSS pseudo classes like :active, :focus, :hover or :visited.

google-chrome-dev-hover

To learn more about capabilities of Google Chrome developer tools I recommend to go through free course Discover Dev Tools from Codeschool.com.

4. February 2013

Useful Django package: django-debug-toolbar

django-debug-toolbar is simply must have tool for Django development.

It adds powerfull toolbar which allows detailed diagnostic and debugging of Django site.

django-debug-toolbarQuick install:

pip install django-debug-toolbar

Open settings.py and add:

MIDDLEWARE_CLASSES = (
    # ...
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    # ...
)
INTERNAL_IPS = ('127.0.0.1',)
INSTALLED_APPS = (
    ...
    'debug_toolbar',
)

Make sure that DEBUG is set to True

DEBUG = True

22. December 2011

How to disable stealing of focus by Console in Eclipse

There is one very annoying issue in Eclipse: stealing of focus by Console window.

Console window is displayed when you run application.

When you set focus to some other window like Search results and application prints something on output then Eclipse will automatically switch to Console window. Your search results are gone.

There is simple way how to get rid of such a behavior.

Go to Window -> Preferences -> Run/Debug -> Console. Uncheck options:

  • Show when program writes to standard out
  • Show when program writes to standard error