Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disconnected from the target VM, address: '127.0.0.1:62535', transport: 'socket' on intellij idea CE. I can't debug my program. Any suggestions?

People also ask

What does disconnected from the target vm mean?

You see this message because there is nothing to debug at current marker. You can check whether your marker is in the correct place or not. also, you might be trying to debug another class that has no markers or empty you can check your run configuration or run the the class that you want debug from project files.

Why debug is not working in Intellij?

To solve this, simply remove the jar of the debugged module from all modules' dependencies in the Project Structure. If you do not know which modules have the debugged module jar as dependencies, you can use some tools (Eg. Sublime Text, bash, ...) to search for the module name which is stored in Intellij *.

How do I debug in Intellij?

Run the program in debug modeClick the Run icon in the gutter, then select Modify Run Configuration. Enter arguments in the Program arguments field. Click the Run button near the main method. From the menu, select Debug.

How do I remove all breakpoints in Intellij?

Remove breakpoints For all breakpoints: from the main menu, select Run | View Breakpoints Ctrl+Shift+F8 , select the breakpoint, and click Remove Delete .


I had the same problem. I noticed that the drop-down menu wasn't set on app. Check this out:

Configuration Example


Which line did you put breakpoint? Suppose you have the following snippet:

    public static void main(String[] args) {
        int res = add(5, 8);
        System.out.println(res);

    }

    public static int add(int a, int b)
    {
        int c=a+b;
        return c;
    }

When I put the breakpoint the line that has { under the add method. I got the very same error as you. If I put the breakpoint to the line int c=a+b;, the debugger works as expected. It's annoying, this is the solution I could come up.


The above message shows that JVM started and has stopped successfully.

Now what you are expecting is to halt on the breakpoint which you have applied in your program but you can't achieve that because you might have clicked on "Mute Breakpoints" button and are trying to debug a code which does not display anything on console.

Since all breakpoints are muted, your program does not halt on the expected line.


Probably your program has a bug before your first breakpoint, or the program never reaches that breakpint.


This issue is very simple to resolve. Click on debug again and in the right-hand corner, you should see a tool bar. There's an icon that looks like two red break points overlapping. Click on that. It will pop open a menu under any exception. Please ensure that Enabled, Suspend, All, Condition, log message to console and log evaluated expression are all checked.


This could be a variety of things, but likely you're hitting an exception before any break points hit. Do you see an exception in your console?

An exception might look like this:

Exception in thread "main" java.lang.NullPointerException