Skip to content

Conversation

@rchiodo
Copy link
Contributor

@rchiodo rchiodo commented Oct 29, 2024

I pulled the latest from PyDev.Debugger into debugpy and figured out what was causing the weird string problem. It was the namedtuple for the _CodeLineInfo. It was generating a lambda that caused problems with the get_file_type API.

Changing the _CodeLineInfo to an actual class gets rid of the lambda.

I'm also pushing over some changes that other people made in debugpy.

return check_version(mod.__version__, "1.0.3")
else:
return True

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a fix for qt loading that somebody submitted to debugpy

return _cache_file_type[cache_key]
except:
if abs_real_path_and_basename[0] == "<string>":
# TODO: This isn't ideal. We should make it so that "<string>" is
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this anymore after eliminating the internal lambda in _pydevd_sys_monitoring.py

writer.finished_ok = True


def test_stop_on_entry_verify_strings(case_setup_dap):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't work anymore since there's no longer a special case for pydevd strings.

filename = frame.f_code.co_filename
name = splitext(basename(filename))[0]
return "%s::%s %s" % (name, frame.f_code.co_name, frame.f_lineno)
line = hasattr(frame, "f_lineno") and frame.f_lineno or 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor fixes I noticed when debugging.

@rchiodo rchiodo changed the title Updates from debugpy after pulling latest PyDev.Debugger Remove special case for strings in pydevd_sys_monitoring Oct 29, 2024
@fabioz fabioz merged commit 3e88fcc into fabioz:main Nov 9, 2024
10 checks passed
@fabioz
Copy link
Owner

fabioz commented Nov 9, 2024

Just applied. Thank you for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants