https://pantsbuild.org/ logo
#general
Title
# general
h

happy-family-315

07/01/2022, 2:23 PM
Hi, I am testing the --debug-adapter feature with test and run goal. I am getting the following warning: `[WARN] Using
run --debug-adapter
on the target django:manage, which sets the field
run_in_sandbox
to
True
. This will likely cause your breakpoints to not be hit, as your code will be run under the sandbox's path.` My breakpoints do not work when debugging tests or debugging a normal run. Is there a way to make that work? Currently I am using PANTS_SHA: 918ac2f68182a8d308113eff336f55dcdbc84847
b

bitter-ability-32190

07/01/2022, 2:38 PM
A few things first, • Yay glad you're trying it out! Feedback very much welcome! • Sorry for the hiccup. Our deprecation policy means we have to make incremental change. That will make this slightly annoying for 2.13, less annoying in 2.14, and then in 2.15 "out of the box"
Second: how this works has been tweaked in https://github.com/pantsbuild/pants/pull/15849 so when possible try to jump to that version or later
But ultimately, by default Pants runs your code in a sandbox, which means the debug server thinks your code is at one location, and your client thinks its at another. In general, we think that your code should be run in-repo by default, so thats what we're working towards. For now, follow the relevant warnings (once you upgrade you'll have one-or-two)
Let me know if you want extra help once you bump Pants version you're using
h

happy-family-315

07/01/2022, 2:49 PM
Thank you very much! I will check out the recommended version.
b

bitter-ability-32190

07/01/2022, 2:52 PM
When you're upgraded, you'll likely want to: • delete the
pex_binary
target for that file (unless you really want to package it) • Set the
run_goal_use_sandbox
field on the
python_source
to
False
• Set
[GLOBAL].use_deprecated_pex_binary_run_semantics
to
True
(use the current semantics) or when you're ready, bump it to
False
h

happy-family-315

07/07/2022, 12:16 PM
Thank you very much it seems to work now! I still need to try it out with pants test goal.
🎉 1
6 Views