Skip to content

Commit 91ad657

Browse files
Don't display frame ID on stack trace
1 parent 5e24df8 commit 91ad657

File tree

3 files changed

+45
-46
lines changed

3 files changed

+45
-46
lines changed

python3/vimspector/stack_trace.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,15 +675,14 @@ def _DrawStackTrace( self, thread: Thread ):
675675
# doesn't set 'line'
676676
line = utils.AppendToBuffer(
677677
self._buf,
678-
' {0}: {1}'.format( frame[ 'id' ], frame[ 'name' ] ),
678+
' {0}'.format( frame[ 'name' ] ),
679679
hl = hl )
680680
else:
681681
line = utils.AppendToBuffer(
682682
self._buf,
683-
' {0}: {1}@{2}:{3}'.format( frame[ 'id' ],
684-
frame[ 'name' ],
685-
source[ 'name' ],
686-
frame[ 'line' ] ),
683+
' {0}@{1}:{2}'.format( frame[ 'name' ],
684+
source[ 'name' ],
685+
frame[ 'line' ] ),
687686
hl = hl )
688687

689688
if ( thread.session == self._current_session and

tests/child_sessions.test.vim

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ function! Test_Python_MultiProcessing()
4343
\ '---',
4444
\ 'Session: run-to-breakpoint ([0-9]\+)',
4545
\ '- Thread [0-9]\+: MainThread (paused)',
46-
\ ' [0-9]\+: Priant@multiprocessing_test.py:6',
47-
\ ' [0-9]\+: <module>@multiprocessing_test.py:28',
46+
\ ' Priant@multiprocessing_test.py:6',
47+
\ ' <module>@multiprocessing_test.py:28',
4848
\ '---',
4949
\ 'Session: Subprocess [0-9]\+ ([0-9]\+)',
5050
\ '- Thread [0-9]\+: MainThread (paused)',
51-
\ ' [0-9]\+: Priant@multiprocessing_test.py:6',
52-
\ ' [0-9]\+: First@multiprocessing_test.py:11',
53-
\ ' [0-9]\+: <module>@multiprocessing_test.py:22',
51+
\ ' Priant@multiprocessing_test.py:6',
52+
\ ' First@multiprocessing_test.py:11',
53+
\ ' <module>@multiprocessing_test.py:22',
5454
\ ],
5555
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
5656
\ 1,
@@ -83,13 +83,13 @@ function! Test_Python_MultiProcessing()
8383
\ '---',
8484
\ 'Session: run-to-breakpoint ([0-9]\+)',
8585
\ '- Thread [0-9]\+: MainThread (paused)',
86-
\ ' [0-9]\+: Priant@multiprocessing_test.py:6',
87-
\ ' [0-9]\+: <module>@multiprocessing_test.py:28',
86+
\ ' Priant@multiprocessing_test.py:6',
87+
\ ' <module>@multiprocessing_test.py:28',
8888
\ '---',
8989
\ 'Session: Subprocess [0-9]\+ ([0-9]\+)',
9090
\ '- Thread [0-9]\+: MainThread (paused)',
91-
\ ' [0-9]\+: First@multiprocessing_test.py:12',
92-
\ ' [0-9]\+: <module>@multiprocessing_test.py:22',
91+
\ ' First@multiprocessing_test.py:12',
92+
\ ' <module>@multiprocessing_test.py:22',
9393
\ ],
9494
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
9595
\ 1,
@@ -209,7 +209,7 @@ function! Test_NodeJsDebug_Simple()
209209
\ '---',
210210
\ 'Session: simple.js \[[0-9]\+\] ([0-9]\+)',
211211
\ '- Thread [0-9]\+: simple.js \[[0-9]\+\] (Paused on breakpoint)',
212-
\ ' [0-9]\+: toast@.*/simple.js:6',
212+
\ ' toast@.*/simple.js:6',
213213
\ ],
214214
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
215215
\ 1,

tests/stack_trace.test.vim

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function! Test_Multiple_Threads_Continue()
3333
\ AssertMatchList(
3434
\ [
3535
\ '- Thread [0-9]\+: .* (paused)',
36-
\ ' .*: .*@threads.cpp:' . string( thread_l )
36+
\ ' .*@threads.cpp:' . string( thread_l )
3737
\ ],
3838
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
3939
\ 1,
@@ -48,7 +48,7 @@ function! Test_Multiple_Threads_Continue()
4848
\ AssertMatchList(
4949
\ [
5050
\ '- Thread [0-9]\+: .* (paused)',
51-
\ ' .*: .*@threads.cpp:' . string( thread_l )
51+
\ ' .*@threads.cpp:' . string( thread_l )
5252
\ ],
5353
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
5454
\ 1,
@@ -73,7 +73,7 @@ function! Test_Multiple_Threads_Continue()
7373
\ AssertMatchList(
7474
\ [
7575
\ '- Thread [0-9]\+: .* (paused)',
76-
\ ' .*: .*@threads.cpp:' . string( thread_l )
76+
\ ' .*@threads.cpp:' . string( thread_l )
7777
\ ],
7878
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
7979
\ 1,
@@ -98,7 +98,7 @@ function! Test_Multiple_Threads_Continue()
9898
\ AssertMatchList(
9999
\ [
100100
\ '- Thread [0-9]\+: .* (paused)',
101-
\ ' .*: .*@threads.cpp:' . string( thread_l )
101+
\ ' .*@threads.cpp:' . string( thread_l )
102102
\ ],
103103
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
104104
\ 1,
@@ -124,7 +124,7 @@ function! Test_Multiple_Threads_Continue()
124124
\ AssertMatchList(
125125
\ [
126126
\ '- Thread [0-9]\+: .* (paused)',
127-
\ ' .*: .*@threads.cpp:' . string( thread_l )
127+
\ ' .*@threads.cpp:' . string( thread_l )
128128
\ ],
129129
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
130130
\ 1,
@@ -149,7 +149,7 @@ function! Test_Multiple_Threads_Continue()
149149
\ AssertMatchList(
150150
\ [
151151
\ '- Thread [0-9]\+: .* (paused)',
152-
\ ' .*: .*@threads.cpp:' . string( notify_l )
152+
\ ' .*@threads.cpp:' . string( notify_l )
153153
\ ],
154154
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
155155
\ 1,
@@ -195,7 +195,7 @@ function! Test_Multiple_Threads_Step()
195195
\ AssertMatchList(
196196
\ [
197197
\ '- Thread [0-9]\+: .* (paused)',
198-
\ ' .*: .*@threads.cpp:' . string( thread_l )
198+
\ ' .*@threads.cpp:' . string( thread_l )
199199
\ ],
200200
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
201201
\ 1,
@@ -370,10 +370,10 @@ function! Test_UpDownStack()
370370
\ AssertMatchList(
371371
\ [
372372
\ '- Thread 1: MainThread (paused)',
373-
\ ' 2: [email protected]:15',
374-
\ ' 3: [email protected]:8',
375-
\ ' 4: [email protected]:23',
376-
\ ' 5: <module>@main.py:29',
373+
374+
375+
376+
\ ' <module>@main.py:29',
377377
\ ],
378378
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
379379
\ 1,
@@ -401,10 +401,10 @@ function! Test_UpDownStack()
401401
\ AssertMatchList(
402402
\ [
403403
\ '- Thread 1: MainThread (paused)',
404-
\ ' 2: [email protected]:15',
405-
\ ' 3: [email protected]:8',
406-
\ ' 4: [email protected]:23',
407-
\ ' 5: <module>@main.py:29',
404+
405+
406+
407+
\ ' <module>@main.py:29',
408408
\ ],
409409
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
410410
\ 1,
@@ -433,10 +433,10 @@ function! Test_UpDownStack()
433433
\ AssertMatchList(
434434
\ [
435435
\ '- Thread 1: MainThread (paused)',
436-
\ ' 2: [email protected]:15',
437-
\ ' 3: [email protected]:8',
438-
\ ' 4: [email protected]:23',
439-
\ ' 5: <module>@main.py:29',
436+
437+
438+
439+
\ ' <module>@main.py:29',
440440
\ ],
441441
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
442442
\ 1,
@@ -465,10 +465,10 @@ function! Test_UpDownStack()
465465
\ AssertMatchList(
466466
\ [
467467
\ '- Thread 1: MainThread (paused)',
468-
\ ' 2: [email protected]:15',
469-
\ ' 3: [email protected]:8',
470-
\ ' 4: [email protected]:23',
471-
\ ' 5: <module>@main.py:29',
468+
469+
470+
471+
\ ' <module>@main.py:29',
472472
\ ],
473473
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
474474
\ 1,
@@ -497,10 +497,10 @@ function! Test_UpDownStack()
497497
\ AssertMatchList(
498498
\ [
499499
\ '- Thread 1: MainThread (paused)',
500-
\ ' 2: [email protected]:15',
501-
\ ' 3: [email protected]:8',
502-
\ ' 4: [email protected]:23',
503-
\ ' 5: <module>@main.py:29',
500+
501+
502+
503+
\ ' <module>@main.py:29',
504504
\ ],
505505
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
506506
\ 1,
@@ -529,10 +529,10 @@ function! Test_UpDownStack()
529529
\ AssertMatchList(
530530
\ [
531531
\ '- Thread 1: MainThread (paused)',
532-
\ ' 2: [email protected]:15',
533-
\ ' 3: [email protected]:8',
534-
\ ' 4: [email protected]:23',
535-
\ ' 5: <module>@main.py:29',
532+
533+
534+
535+
\ ' <module>@main.py:29',
536536
\ ],
537537
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
538538
\ 1,

0 commit comments

Comments
 (0)