Commit 4d7421d
feat: enable-debug option (sonic-net#18009)
Description of PR
Summary:
This PR adds remote debugging functionality using https://github.com/microsoft/debugpy support with vs-code for sonic-mgmt container. This will need the follow PR to be mereged as well:
feat: add debugpy dependency sonic-buildimage#22341
In summary, one can setup a remote debug container when provide option --enable-debug. For example:
./setup-containers.sh sonic-mgmt-user_master --enable-debug
Which will automatically scan for available ports and establish a tunnel between docker and host for debugpy purpose. The user then can execute normal run_test command with --enable-debug added to the end to connect with their vscode client. For example:
./run_tests.sh -n vms-kvm-t0 -d vlab-01 -c bgp/test_bgp_fact.py -f vtestbed.yaml -i ../ansible/veos_vtb --enable-debug
Fixes # (issue) 32317137
Approach
What is the motivation for this PR?
To provide a native-like debug experience, improve our development efficiency.
How did you do it?
Described above
How did you verify/test it?
Verified on dev server
Signed-off-by: Austin Pham <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>1 parent f10800b commit 4d7421d
2 files changed
Lines changed: 83 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| |||
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| 126 | + | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
| |||
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
136 | 153 | | |
137 | 154 | | |
138 | 155 | | |
| |||
259 | 276 | | |
260 | 277 | | |
261 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
262 | 283 | | |
263 | 284 | | |
264 | 285 | | |
| |||
272 | 293 | | |
273 | 294 | | |
274 | 295 | | |
| 296 | + | |
275 | 297 | | |
276 | 298 | | |
277 | 299 | | |
| |||
387 | 409 | | |
388 | 410 | | |
389 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
390 | 435 | | |
391 | 436 | | |
392 | 437 | | |
| |||
431 | 476 | | |
432 | 477 | | |
433 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
434 | 490 | | |
435 | 491 | | |
436 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
304 | | - | |
305 | | - | |
| 305 | + | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | | - | |
312 | | - | |
| 312 | + | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | | - | |
319 | | - | |
| 319 | + | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
386 | 407 | | |
387 | 408 | | |
388 | 409 | | |
| |||
0 commit comments