/** * This test will set a breakpoint at some place in the program and will tell the launch to NOT * "stop on main". We will verify that the first stop is at the breakpoint that we set. */ @Ignore @Test public void testNoStopAtMain() throws Throwable { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false); // Set this one as well to make sure it gets ignored setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main"); // We need to set the breakpoint before the launch is started, but the only way to do that is // to set it in the platorm. Ok, but how do I get an IResource that points to my binary? // The current workspace is the JUnit runtime workspace instead of the workspace containing // the JUnit tests. IFile fakeFile = null; CDIDebugModel.createLineBreakpoint( EXEC_PATH + EXEC_NAME, fakeFile, ICBreakpointType.REGULAR, LAST_LINE_IN_MAIN + 1, true, 0, "", true); //$NON-NLS-1$ doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); assertTrue( "Expected to stop at envTest but got " + stoppedEvent.getFrame().getFunction() + ":", stoppedEvent.getFrame().getFunction().equals("envTest")); }