Commit bea4bf5
committed
local_fs_map for DAP
On DAP via TCP/IP connection, all the source code are detected
as remote files (without `localfs:true` in launch.json for VSCode).
In this case, DAP clients (VSCode, ...) receive the contents
of the file from DAP server and open an editor window in readonly mode.
`local_fs_map` configuration can set remote->local path translation.
For example,
```
RUBY_DEBUG_LOCAL_FS_MAP=/remote/src/:/local/src/ rdbg -O --port=...
```
On this case, if remote path is `/remote/src/is/foo.rb`, then DAP
returns `/local/src/is/foo.rb` and open the local file as writable
mode.
You can specify multiple path maps with ',' character like
```
RUBY_DEBUG_LOCAL_FS_MAP=/r1/:/l1/,/r2/:/l2/ ...
```
and also you can specify this map within launch.json for VSCode like:
```
{
"type": "rdbg",
"name": "Attach with rdbg (TCP/IP 12345)",
"request": "attach",
"debugPort": "localhost:12345",
"localfsMap": "/remote/src/:/local/src/"
}
```
If both are provided, launch.json setting is used.
fix #463
fix ruby/vscode-rdbg#321 parent 85d29dc commit bea4bf5
2 files changed
+42
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| 242 | + | |
| 243 | + | |
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
| |||
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
| 390 | + | |
| 391 | + | |
387 | 392 | | |
388 | 393 | | |
389 | 394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
74 | 90 | | |
75 | | - | |
76 | | - | |
| 91 | + | |
| 92 | + | |
77 | 93 | | |
78 | 94 | | |
79 | | - | |
80 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
81 | 106 | | |
82 | 107 | | |
83 | 108 | | |
| |||
86 | 111 | | |
87 | 112 | | |
88 | 113 | | |
89 | | - | |
| 114 | + | |
90 | 115 | | |
91 | 116 | | |
92 | 117 | | |
| |||
228 | 253 | | |
229 | 254 | | |
230 | 255 | | |
231 | | - | |
| 256 | + | |
232 | 257 | | |
233 | 258 | | |
234 | 259 | | |
235 | 260 | | |
236 | | - | |
| 261 | + | |
237 | 262 | | |
238 | 263 | | |
239 | 264 | | |
| |||
647 | 672 | | |
648 | 673 | | |
649 | 674 | | |
650 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
651 | 678 | | |
652 | 679 | | |
653 | 680 | | |
| |||
658 | 685 | | |
659 | 686 | | |
660 | 687 | | |
661 | | - | |
| 688 | + | |
662 | 689 | | |
663 | 690 | | |
664 | 691 | | |
| |||
0 commit comments