provegard / ncdbg

A debugger for Nashorn that uses Chrome DevTools as frontend
BSD 3-Clause "New" or "Revised" License
31 stars 5 forks source link

Debugger.setBreakpointByUrl with non-existent location throws #22

Closed provegard closed 7 years ago

provegard commented 7 years ago

If DevTools sees a script that it has seen before and has a breakpoint for, it will invoke Debugger.setBreakpointByUrl. However, if the script contents are different, in particular if the file is smaller than before, the location may be invalid. Throwing an exception is trouble in this case, returning a null breakpoint ID works.