Search code examples
javaeclipsedebuggingbreakpoints

test without breakpoints


I have coded in c++ in visual studio for several years.

I am now working in java with eclipse.

the java programs are launched from a .bat file so I cannot breakpoint them to debug.

Without being able to step through my code i am finding it very hard to find the root cause of the error as the thrown exception is not usually the source of the problem.

How can I debug my code without access to breakpoints ?


Solution

  • You can find the main method, as suggested by Ben J, and run this from Eclipse. To pass arguments to it, edit the run configuration. e.g. Right-click on the main class, click "Run As" and then "Run Configurations...". Select the "Arguments" tab and enter whatever you need.

    Or since you need to debug this, click "Debug As" and "Debug Configurations..." instead.