https://github.com/sukovanej/node-debug
NodeJS CLI debugger based on Chrome DevTools Protocol
https://github.com/sukovanej/node-debug
chrome-devtools-protocol nodejs rust
Last synced: 5 months ago
JSON representation
NodeJS CLI debugger based on Chrome DevTools Protocol
- Host: GitHub
- URL: https://github.com/sukovanej/node-debug
- Owner: sukovanej
- License: mit
- Created: 2022-04-15T15:10:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-17T14:04:07.000Z (over 3 years ago)
- Last Synced: 2025-04-12T20:54:59.129Z (9 months ago)
- Topics: chrome-devtools-protocol, nodejs, rust
- Language: Rust
- Homepage:
- Size: 105 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## TODO
- set max timeout for blocking websocket calls
- continue-to command - continue to a position
- ns command - combination of next and show
## CDT Protocol notes
Enable debugger
```json
{"id": 1, "method": "Debugger.enable"}
```
Resume debugger
```json
{"id": 1, "method": "Debugger.resume"}
```
Pause debugger
```json
{"id": 1, "method": "Debugger.pause"}
```
Run if waiting for debugger
```json
{"id": 1, "method": "Runtime.runIfWaitingForDebugger"}
```
Get possible breakpoints
```json
{"id": 1, "method": "Debugger.getPossibleBreakpoints", "params": { "start": {"lineNumber": 0, "scriptId": "100"}}}
```
Step over
```json
{"id": 1, "method": "Debugger.stepOver"}
```
Get script source
```json
{"id": 1, "method": "Debugger.getScriptSource", "params": { "scriptId": "138"}}
```
Step into
```json
{"id": 1, "method": "Debugger.stepInto"}
```
Chromium devtools comm
```json
{"id":1,"method":"Runtime.enable","params":{}}
{"id":2,"method":"Debugger.enable","params":{"maxScriptsCacheSize":100000000}}
{"id":3,"method":"Debugger.setPauseOnExceptions","params":{"state":"none"}}
{"id":4,"method":"Debugger.setAsyncCallStackDepth","params":{"maxDepth":32}}
{"id":1,"result":{}}
{"id":5,"method":"Profiler.enable","params":{}}
{"id":6,"method":"Debugger.setBlackboxPatterns","params":{"patterns":[]}}
{"id":7,"method":"Runtime.runIfWaitingForDebugger","params":{}}
```