Start JDB with list of breakpoints

457 Views Asked by At

Is there a way to start jdb and attach from the beginning a list of breakpoints?

Something along the line of jdb -<?some_flag?> ./breakpoints Main

It is trully tedious entering these breakpoints manually upon starting a new debugging session, and I am sure there must be a way. The documentation does not make it clear that such a thing exists.

1

There are 1 best solutions below

0
On BEST ANSWER

Update

I have figured it out with the use of:


Solution

The read command reads all the commands that jdb needs from a specified file. In this file one can write all the breakpoints and commands before starting jdb.


Example workflow

So this is the workflow I have now:

  1. I have a .jdbrc in my Home folder that contains 1 line
read break.lines
  1. Then in the folder where I am opening the debugger I have the file called break.lines where I define all my breaks prior to running JDB