-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix/enhance: inspector/debugging #188
Comments
This PR rewrites the logic for establishing a connection with the debugging socket, and adds some enhancements along the way. Part of solving #188. Some highlights - - I've installed `"devtools-protocol`, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) Some things that I still have to do, and will do so in followup PRs - - clear the console whenever we make a change to the worker - stay connected when we shift between local/remote mode - eventually, move to using the devtools hosted at cloudflareworkers.com.
This PR rewrites the logic for establishing a connection with the debugging socket, and adds some enhancements along the way. Part of solving #188. Some highlights - - I've installed `"devtools-protocol`, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) Some things that I still have to do, and will do so in followup PRs - - clear the console whenever we make a change to the worker - stay connected when we shift between local/remote mode - eventually, move to using the devtools hosted at cloudflareworkers.com.
This PR rewrites the logic for establishing a connection with the debugging socket, and adds some enhancements along the way. Part of solving #188. Some highlights - - I've installed `"devtools-protocol`, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) Some things that I still have to do, and will do so in followup PRs - - clear the console whenever we make a change to the worker - stay connected when we shift between local/remote mode - eventually, move to using the devtools hosted at cloudflareworkers.com.
This PR rewrites the logic for establishing a connection with the debugging socket, and adds some enhancements along the way. Part of solving #188. Some highlights - - I've installed `"devtools-protocol`, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) Some things that I still have to do, and will do so in followup PRs - - clear the console whenever we make a change to the worker - stay connected when we shift between local/remote mode - eventually, move to using the devtools hosted at cloudflareworkers.com.
This PR rewrites the logic for establishing a connection with the debugging socket, and adds some enhancements along the way. Part of solving #188. Some highlights - - I've installed `"devtools-protocol`, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) Some things that I still have to do, and will do so in followup PRs - - clear the console whenever we make a change to the worker - stay connected when we shift between local/remote mode - eventually, move to using the devtools hosted at cloudflareworkers.com.
This PR rewrites the logic for establishing a connection with the debugging socket, and adds some enhancements along the way. Part of solving #188. Some highlights - - I've installed `"devtools-protocol`, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) Some things that I still have to do, and will do so in followup PRs - - clear the console whenever we make a change to the worker - stay connected when we shift between local/remote mode - eventually, move to using the devtools hosted at cloudflareworkers.com.
Some followup tasks that I'm logging here and I'l get around to soon -
How to write tests for the inspector logic -
|
This PR rewrites the logic for establishing a connection with the debugging socket, and adds some enhancements along the way. Part of solving #188. Some highlights - - I've installed `"devtools-protocol`, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) Some things that I still have to do, and will do so in followup PRs - - clear the console whenever we make a change to the worker - stay connected when we shift between local/remote mode - eventually, move to using the devtools hosted at cloudflareworkers.com.
The remaining task on this, to write tests, isn't blocking GA, so I'm going to move this to the non blocking column. |
We should also make the logs in the terminal much nicer, probably coloured (via #590) |
@threepointone I'm going to close this in an effort to clean up older issues. Thanks for all of your work on it. We are currently working on updating Worker DevTools across the ecosystem, and those changes should be visible shortly. If you have additional ideas related to debugging/inspecting please file them as separate feature requests. |
The current implementation of how we do inspection/debugging is a bit broken, and not very usable. Some problems -
Overall the experience kinda sucks, and we should make it better. Here's a list of fixes/enhancements to be done.
Assigning this to myself because I'm working on these items this week.
The text was updated successfully, but these errors were encountered: