https://github.com/julia-vscode/debugadapter.jl
Julia implementation of the Debug Adapter Protocol
https://github.com/julia-vscode/debugadapter.jl
Last synced: 4 months ago
JSON representation
Julia implementation of the Debug Adapter Protocol
- Host: GitHub
- URL: https://github.com/julia-vscode/debugadapter.jl
- Owner: julia-vscode
- License: mit
- Created: 2019-07-01T17:33:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-15T02:15:35.000Z (9 months ago)
- Last Synced: 2024-09-15T08:05:42.370Z (9 months ago)
- Language: Julia
- Size: 175 KB
- Stars: 40
- Watchers: 7
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# DebugAdapter
Julia implementation of the Debug Adapter Protocol
## Running the debug adapter
To run a debug session, first instantiate `DebugAdapter.DebugSession` by passing it a connection, which can be a socket, named pipe. Then call `run` on the session:
```julia
import DebugAdapter# Create or acquire a connection
conn = ... # This should be a Base.IO subtype, for example a named pipe or socket connectionsession = DebugAdapter.DebugSession(conn)
run(session)
```The call to `run` will return once the debug session has finished.
## Julia specific launch and attach arguments
The Julia specific launch arguments can be seen in the type `JuliaLaunchArguments` in this repo. The most important one is `program`, which needs to be an absolute path to a Julia file.
The Julia specific attach arguments can be seen in the type `JuliaAttachArguments` in this repo. Note that even when the debugger is attached, no code will automatically be debugged. Instead, one needs to run the code that should be debugged via a call to `DebugAdapter.debug_code` like this:
```julia
mod = Main # This is the module in which the code should run
code = """
println("Hello world")
""" # This is the code that should be run
filepath = joinpath(homedir(), "something.jl") # This is the filepath that should be used for the debuggerDebugAdapter.debug_code(session, mod, code, filepath)
```