1

I'm running a test case in debug mode on a new installation of Netbeans 8.2 with a break point on a myId field.

    @Test
    public void testCreateDocumentSecurityNullRequest() throws Exception {
        final Integer myId = 1;

        myRequest request = null;

        mockMvc.perform(post("/pathTo/apply/" + myId).contentType(contentType).content(json(request)))
                .andExpect(jsonPath("$.code", is("400")));
    }

I know the test is executed because I see the test results, but the debugger doesn't stop on my break point.

The Debugger Console shows:

Listening on 23206
User program running
LineBreakpoint myTest.java : 'line #' successfully submitted.
User program finished

I don't understand why it's not stopping and just continuing? I tried it in Eclipse and it stops and let's me continue as I would expect. I'm sure I'm just misunderstanding something simple but I read documentation and nothing sticks out to me. I also looked at some other Stack Overflow posts that were similar but those didn't seem to fit my issue.

mdo123
  • 1,757
  • 3
  • 16
  • 34

2 Answers2

0

I had a similar issue. NetBeans 6.5 won't stop on a breakpoint in my code.

I figured that while working with a project I changed source location (was: "project.6.5", I changed it to just "project").

NetBeans remembered the old source location ("project.6.5") which became non-matching as I ran code from "project". A breakpoint was displayed correctly (red square), but won't stop.

I opened Window > Debug > Sources and checked current code ("project"). Breakpoint became a broken square and it wrote in logs about source not matching.

After I unchecked old source ("project.5.6") it started working fine again.

enter image description here

Sergey Shevchuk
  • 151
  • 1
  • 5
-2

...\AppData\Roaming\NetBeans\8.2\config\Services\org-netbeans-modules-debugger-Settings.properties - remove all 'breakpoint' lines from this file.