Project is no longer responsible for toggle breakpoints or telling breakpoint store to toggle breakpoints.
Now editor toggles breakpoints by directly telling breakpoint store too. In the future I plan on removing
on breakpoint related handling from project to breakpoint store.
I also fix some debugger related test compile errors. Plenty of them won't pass because we're still in a refactor,
but they build now
* Move most of the requests into the client state itself.
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
* WIP
* Fix some errors and create new errors
* More teardown
* Fix detach requests
* Move set variable value to dap command
* Fix dap command error and add evaluate command
* FIx more compiler errors
* Fix more compiler errors
* Clipppyyyy
* FIx more
* One more
* Fix one more
* Use threadId from project instead u64
* Mostly fix stack frame list
* More compile errors
* More
* WIP transfer completions to dap command
Co-Authored-By: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
* Finish console completions DapCommand impl
* Get Zed to build !!
* Fix test compile errors: The debugger tests will still fail
* Add threads reqeust to debug session
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This should fix issues when we update a module it's content. That wouldn't show up anymore. So by always resetting the list we should get the most up-to-date value.
NOTE: We probably want to reduce the amount of resets and notifies every time we update the client state, even though we didn't update the modules.
We could send and specific event from the client state, each time we update a module. So instead of using a observer we could use a normal event subscriber and only update the list based on that event
* WIP setup active debug sessions request
* Set up active debug sessions request that's send when joining a project
* Fix test debug panel console
* Remove debugger tables from collab db
* Wip request active debug sessions
* WIP
Co-Authored-By: Piotr Osiewicz <piotr@zed.dev>
Co-Authored-By: Anthony Eid <hello@anthonyeid.me>
* Tear stuff out and make the world burn
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Piotr <piotr@zed.dev>
* Fix compile errors
* Remove dap_store from module list and fix some warnings
Module list now uses Entity<DebugSession> to get active modules and handle remote/local state
so dap_store is no longer needed
* Add Cacheable Command trait
This gets rid of ClientRequest or whatever the name was; we don't need to enumerate every possible request and repeat ourselves, instead letting you mark any request as cached with no extra boilerplate.
* Add Eq requirement for RequestSlot
* Implement DapCommand for Arc<DapCommand>
That way we can use a single allocated block for each dap command to store it as both the cache key and the command itself.
* Clone Arc on demand
* Add request helper
* Start work on setting up a new dap_command_handler
* Make clippy pass
* Add loaded sources dap command
* Set up module list test to see if Modules request is called
* Fix compile warnings
* Add basic local module_list test
* Add module list event testing to test_module_list
* Bring back as_any_arc
* Only reset module list's list state when modules_len changes
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Piotr <piotr@zed.dev>
* Reapply "Lazy load stack frame information (scopes & variables) (#106)"
This reverts commit 27b60436b8.
* Reapply "Remove futures from debugger ui crate"
This reverts commit 3cf96588e2.
* Don't fetch initial variables twice
This was introduced by my original PR, because I added the fetch on stack frame select but when the stack frames where updated we would already fetch the initial variables. And when the selectedStackFrameUpdated event was received we would refetch it because it was not done yet.
* Remove duplicated method just for testing
* Make keep open entries work again
The issue was the we used the scope_id, which changes after each debug step. So using the name of the scope instead should be more reliable.
* Correctly invalidate variable list information
* Comment out collab variable list for now
Also commenting out an event that triggers the infinite loop.
We want to revisited the collab stuff anyway so we decided to do it this way.
I'm reverting this because it introduced a regression with collab's test
variable list & didn't supoort fetching stack frames initiated by a
remote user.
This reverts commit 945e3226d8.
This PR shows console output & removes the query bar for remote clients.
We don't show the query bar because it's currently impossible for remote clients to send evaluations requests from their console. We didn't implement that feature yet because of security consoles and will do so in the future with permissions.
Co-authored-by: Remco Smits \<djsmits12@gmail.com\>
* Add basic collab debug console test
Co-authored-by: Remco Smits <djsmits12@gmail.com>
* Show output events on remote client debug consoles
Co-authored-by: Remco Smits <djsmits12@gmail.com>
* Don't show debug console query bar on remote clients
Co-authored-by: Remco Smits <djsmits12@gmail.com>
---------
Co-authored-by: Remco Smits <djsmits12@gmail.com>
* Add tests for incremental fetching scopes & variables for stack frames
* Fetch scopes and variables when you select a stack frame
* Send proto update message when you select a stack frame
Before this change it was impossible to see the command arguments, as the executable was to long.
This changes that so we use the process name as executable name VSCode as seems to do this. So you could still see the arguments of the program.
I also added a tooltip to see the correct executable + arguments.
* WIP add toolchain for python
Co-Authored-By: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
* Integrate toolchain store with dap_store & use it for debugpy
* Wip require worktree to start debug session
* Move start debug session to project for determing the worktree
* Make all tests pass again
* Make collab tests pass
* Use notify instead of manual notification
* Use reference instead of clone
* Revert "Use reference instead of clone"
This reverts commit 61469bb1679bc35d5d3bf0b93e5b7cfc94357c80.
* Revert "Use notify instead of manual notification"
This reverts commit a0b9bf52a1d948dfb244c4b7040576a34ec6f465.
* Revert debugger branch merge
* Revert "Revert debugger branch merge"
This reverts commit 56c883d4dba4877826ea2185a8177fddefa0d054.
* Clean up
* Make node runtime required
* Pass worktree id into get_environment
* Fix use the resolved debug adapter config
* Add fallback if toolchain could not be found to common binary names
---------
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>