Skip to content

Commit

Permalink
Mark warning messages as important. Fixes microsoft#170
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Jan 20, 2022
1 parent 5adc45e commit f3c631c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def make_get_thread_stack_message(self, py_db, seq, thread_id, topmost_frame, fm

@overrides(NetCommandFactory.make_warning_message)
def make_warning_message(self, msg):
category = 'console'
category = 'important'
body = OutputEventBody(msg, category)
event = OutputEvent(body)
return NetCommand(CMD_WRITE_TO_CONSOLE, 0, event, is_json=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1458,9 +1458,11 @@ def test_case_skipping_filters(case_setup, custom_setup):
messages = json_facade.mark_messages(
OutputEvent, lambda output_event: 'Frame skipped from debugging during step-in.' in output_event.body.output)
assert len(messages) == 1
found_just_my_code = 'Note: may have been skipped because of \"justMyCode\" option (default == true)' in next(iter(messages)).body.output
body = next(iter(messages)).body
found_just_my_code = 'Note: may have been skipped because of \"justMyCode\" option (default == true)' in body.output

assert found_just_my_code == expect_just_my_code
assert body.category == 'important'

json_facade.write_step_in(json_hit.thread_id)
json_hit = json_facade.wait_for_thread_stopped('step', name='callback2')
Expand Down
1 change: 1 addition & 0 deletions tests/debug/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def __init__(self, debug_config=None):
timeline.Event("output", some.dict.containing({"category": "stdout"})),
timeline.Event("output", some.dict.containing({"category": "stderr"})),
timeline.Event("output", some.dict.containing({"category": "console"})),
timeline.Event("output", some.dict.containing({"category": "important"})),
]
)

Expand Down

0 comments on commit f3c631c

Please sign in to comment.