feat: initialize debugger on first call#237
feat: initialize debugger on first call#237tschneidereit merged 1 commit intobytecodealliance:mainfrom
Conversation
This enables using content debugger for scripts that don't target wasi/http. Depending on how StarlingMonkey has been configured, `maybe_init_debugger` can be a nop or perform actual debugger initialization. There is currently a triple line of defense to prevent accidental debugger initialization: - StarlingMonkey build must be configured with ENABLE_JS_DEBUGGER=ON - StarlingMonkey runtime arguments must include the `--enable-script-debugging` option - The environment variable DEBUGGER_PORT must be defined
|
Hey @andreiltd thanks for submitting this -- I'm going to leave the review to @tschneidereit since he knows the C++ side better (and the change looks fine to me!) but I wanted to ask if there should be some documentation changes that should go along with this? Right now everything is kind of jammed into |
|
Hey! Good point. I think we need to choose where the debugger documentation should live and link to it from other projects. I would prefer to have a chapter in StarlingMonkey mdbook if we decide to move forward with it: https://andreiltd.github.io/StarlingMonkey/ |
tschneidereit
left a comment
There was a problem hiding this comment.
LGTM! Agreed with Victor on documentation, but given that we don't really have documentation for JS debugging at all right now, I don't want to block landing this on documentation. So I'll land it now, and we should talk about docs in more detail separately.
This enables using content debugger for scripts that don't target wasi/http. Depending on how StarlingMonkey has been configured,
maybe_init_debuggercan be a nop or perform actual debugger initialization. There is currently a triple line of defense to prevent accidental debugger initialization:--enable-script-debuggingoption