My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label debugger. Show all posts
Showing posts with label debugger. Show all posts

Wednesday, July 24, 2019

Remote debugging using IntelliJ IDE

Here you'll see how to create and manage a configuration to remotely debug your launched Alfresco project that's waiting for a connection. This assumes you have an IntelliJ IDEA IDE up and running, and have already imported the same project you are going to debug.

For more details on how import an Alfresco project into your IntelliJ IDEA IDE, see Setting up your development environment using Intellij IDEA

Open the IntelliJ IDEA IDE and click on Run Configurations (top right).


Click on the green plus (top left) and select Remote to add a new configuration for a remote app.
Enter a name for your configuration, for example, "My-remote-debug"

Apply some settings eg. Change the port number eg. to 8000.
Check that your settings match the screenshot.
Click OK.



Now when you debug, You will be taken back to the project source code.
To start debugging Click on the bug (debug) icon and select the new configuration My-remote-debug to run it.


The project starts running and generating all the log messages of a regular launch in the terminal window. Open your browser and type http://localhost:8080/hello

Voila!! IntelliJ IDEA will intercept the execution at the breakpoint:

Friday, December 16, 2011

How to set WinDbg as your Default Postmortem Debugger

In one of my my earlier post related to Microsoft Useful Apps and Powertoys for Windows, I already talked about WinDbg. WinDbg is a tool for debugging any Crash in a program. This tool automatically syncs up the required pdb files ie. The symols file from the MSDN and enables your machine to debug the problems. Refer http://http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx You can have a dump of your crash and investigate, or contact your administrator. In addition, you can also log a radar (defect/bug) on the Microsoft. (Also See http://en.wikipedia.org/wiki/WinDbg)

This time I m gonna xplain how to set WinDbg as a Default Windows Postmortem Debugger.

Usually Windows system has Dr. Watson as the default debugger. But undoubtedly, Windbg has upper hands.

So what you can do is as follows:
1. Try to Install the latest Windbg Debugging Tools for Windows:
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
2. You can Set WinDbg as a default debugger by issuing the following command:
WinDbg -I
It is very important to note that the letter 'I' must be capitalized.



3. Create some folder where the dump will. Give it full read/write permissions.
4. Open Registry editor (Run->regedit at command line)
Go to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
It has the following value:
"C:\Program Files\Debugging Tools for Windows\windbg.exe" -p %ld -e %ld -g
Append this with following string:
-c '.dump /o /f C:\DMP\dmp1.dmp; q' -Q -QS -QY -QSY
The new key will have something like this :
"C:\Program Files\Debugging Tools for Windows\windbg.exe" -p %ld -e %ld -g -c '.dump /o /f C:\DMP\dmp1.dmp; q' -Q -QS -QY -QSY
[Lets assume here C:\DMP is the folder u wanna make dump creation folder]
5. Important to note the address of WinDbg, since it may vary depending on or OS being x86 or 64 bit.
6. Now it is set as postmortem debugger. In case of any crash now, windbg will pop-up saying the error is encounterd. Dump is stored in the folder allocated earlier.

You must remember the following:
a) Dump is not appended, so if there is some old dump, then that will be over-written
b) On some OS like Win Server 2k3, Win-XP XP and later, you can use the /ma switch instead of /f to save additional debugging information.

Readers can email me personally, as many regularly do, if they found the article helpful and wanna share how this helped them in their roles. Finding my email address is not at all any deal ;)
Cheers!!!
-Mohd Anwar Jamal Faiz