Open TauPan opened 3 years ago
Another brief look at the vscode documentation turns up that apparently vscode doesn't support this... hmm... :-\
Simply opening a feature request on debugpy yielded some valuable insight: https://github.com/microsoft/debugpy/issues/722#issuecomment-918043450 ... I can verify that I'm able to set "User Uncaught Exceptions" in dap-mode, however launching pytest from dap-debug will not pause in an assertion failure...
Were you able to solve this somehow? For me, this would also be a pretty handy feature.
Were you able to solve this somehow? For me, this would also be a pretty handy feature.
Not so far. Specifically not after updating dap-mode and the ms debugpy server just now.
pytest supports the
--pdb
and--pdbcls
switches to launch a debugger if a test assertion fails:This is something that I use quite often so I would appreciate if dap-python could support it in some way.
Briefly glancing at the debugpy documentation and experimenting a bit it turns out that pytest tries to run the
post_mortem
method of that class https://docs.python.org/3/library/pdb.html#pdb.post_mortem which debugpy and its predecessor apparently do not support.I think there may be some way to accomplish this with the current traceback and introspection and a custom class in python, but more reading and experimenting is necessary.
To elaborate: I think this could be done with a pytest plugin, which might be out of scope for dap-python, but I'm not sure what kind of support would be needed on dap-python's side.