-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Test Debug Mode: Cannot read properties of null (testsuites) #22032
Comments
Hello! Can you try this on the new rewrite testing experiment and see if that resolves your problem? You can do so by adding this setting to your users settings.json "python.experiments.optInto": ["pythonTestAdapter"]. You can confirm you have the rewrite enabled by setting "python.analysis.logLevel": "Trace", in your user settings then check for Experiment 'pythonTestAdapter' is active in your python logs. Thanks! |
Ignore this, I was running pytest with args, specifically pytest-xdists `-n 8` args, which breaks debugging. Pytest-xdist explicitly tells you that the `--pdb` option is disabled in the docsUnfortunately having the same issue with the experiment enabled. Test runs fine when not debugging and I can debug a normal python script. In this case I'm running it directly from the test (right click > debug test) Python 3.11.2 User Settings
System Info
AB Test Info
|
What is |
The value for me is: "python.testing.pytestArgs": [
".",
// see: https://pytest-xdist.readthedocs.io/en/latest/distribution.html
// NOTE: you cannot use multiple workers AND debug tests
// see: https://pytest-xdist.readthedocs.io/en/latest/known-limitations.html#debugging
"-n",
"8",
"--randomly-dont-reset-seed",
"--disable-socket",
"--allow-unix-socket",
"--allow-hosts="
], I gave it a shot with no args and it worked, sorry, didn't realize there were 2 threads for the same error. I'll add my details to the other thread. What's even better is I left that note for myself 2 weeks ago and forgot, sorry! |
Before I do that: I notice there's an error in the debug console when I try to debug a test:
That's interesting because the default mode for playwright tests is headless, you have to specifically pass in the headed argument to run them headed. That makes me wonder if debug mode is somehow passing in an argument or setting an environment variable that makes them try to run in headed mode. Maybe the DISPLAY variable? I see a similar issue here: To clarify: It's already known that playwright tests can't run in headed mode inside a dev container, so the mystery is why debug mode prompts the headed mode. |
@pamelafox if you have the setting in your user settings it should copy over the remote settings- does that help? I will look at the playwright repo to see if I can repro this behavior. Thanks! |
Hello! Wanted to follow up, did this work if you moved the setting to your user settings? |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
Type: Bug
Behaviour
Expected vs. Actual
I expect debug mode to work for the testing tab, but it fails with an error.
Steps to reproduce:
Sept 18 update from cruft Azure-Samples/azure-flask-postgres-flexible-appservice#1
I suspect it's related to playwright, but that's just a guess.
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2023.14.0
VS Code version: Code 1.81.1 (Universal) (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:20:33.924Z)
OS version: Darwin arm64 22.6.0
Modes:
Remote OS version: Linux arm64 5.15.49-linuxkit-pr
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: