softwareCobbler / luceedebug

line debugger for lucee
GNU Lesser General Public License v2.1
44 stars 15 forks source link

move server init to earlier in lifecycle #13

Closed softwareCobbler closed 1 year ago

softwareCobbler commented 1 year ago

Right now the dap server and jdwp connections are initialized in response to Lucee loading PageContextImpl. This require users to "prime" the engine, by making a typical http request to it first. Investigate moving networking init to earlier in the lifecycle, optimally during agent premain.

jamiejackson commented 1 year ago

Documented the need for "priming" in the latest commit of this PR. It was one of the things that had been blocking me, previously.

11

softwareCobbler commented 1 year ago

This should be improved with 476c7f6722caade604f9f15d969484d56b0ffc87 -- all the server stuff should (!) spawn prior to the first HTTP request into the engine.

jamiejackson commented 1 year ago

Nice! I just tried it and the debugger was able to connect before any requests were made.

Observation: Before I exercise the code, the breakpoints show up as "Unverified Breakpoint." Once the code is exercised, the breakpoint stops appropriately and the breakpoints light up.

It makes sense why it works that way since it can't associate breakpoints until class files are compiled.

jamiejackson commented 1 year ago

I created a PR to remove "priming" from the readme.

Is there more that you wanted to do before closing this ticket, by the way?

softwareCobbler commented 1 year ago

No not much else to do here.