Open yfried opened 3 years ago
What is the point of the debug mapping in the run configuration if it's not respected?
If you dismiss the prompt (hitting cancel) then it will ignore the prompt and respect the values in the debug mapping of the run configuration.
I can see how this might be confusing (and we can add some wording). Let me know if this addresses the issue.
But to answer your question specifically - the point of the prompt is to provide some attempted guesses at what the mapping might be. We can't know for sure since the container configuration can vary, which is why we also provide the ability to manually enter the mapping in the run configuration. Also, we prompt after hitting the debug button because Skaffold provides the guesses and it can't know until runtime.
@etanshaul Thank you, but if I hit cancel, then there's no mapping at all. I get:
[billing-bot] pydev debugger: warning: Trying to add breakpoint to file that does not exist: /Users/yfried/<path_on_my_local_machine>/main.py (will have no effect).
I might be missing something here, but unless I create a fake path in my docker image that correlates to the project root, debug doesn't work
In the old remote server config, I could configure mapping as I saw fit and even configure paths to exclude from sync. For example, I could exclude an entire dir, and then only map a certain subdir in it to the remote server
Thank you, but if I hit cancel, then there's no mapping at all.
We may have a bug here, but just to confirm: did you set the necessary mapping in the Run Configuration debug tab? Even with that set, debug is not working after hitting cancel
on the dialog - correct?
In the old remote server config, I could configure mapping as I saw fit and even configure paths to exclude from sync.
Sorry - what is the "old remove server config" you are referencing?
We may have a bug here, but just to confirm: did you set the necessary mapping in the Run Configuration debug tab? Even with that set, debug is not working after hitting cancel on the dialog - correct?
Yes, I did, and they weren't used.
Sorry - what is the "old remove server config" you are referencing?
Pycharm has a feature for remote debugging, where you can map and sync file to a remote server via ssh and then run debug on it. I assumed Cloud Code mapping would work the same. https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#remote-debug-config
sounds good. we'll investigate this.
Kamino cloned this issue to GoogleCloudPlatform/cloud-code-intellij-internal
I can add the following; I have a single project with multiple source roots (same as OP). Running embedded skaffold v1.32.0 in PyCharm on Windows. I have configured source mapping in the "Run Configuration debug tab". If I press cancel, it seems the aforementioned source mapping is taken into account (I don't get the 'Trying to add breakpoint to file ...' warning, it seems it can apply the breakpoint), but I can't seem to stop at the set breakpoint... If I press OK (actually for me, the suggested mapping is good), no mapping is configured (I get the 'Trying to add breakpoint to file ...' warning mentioning my project directory on Windows).
Hope it helps, and also waiting patiently for a solution.
@shoskensMagics thanks for those details. To confirm - in neither scenario we’re you able to stop at breakpoints? Or did it work when you clicked OK on the dialog?
@etanshaul no, I could never jump into the debugger at those breakpoints.
@etanshaul What is the status of the issue? I just encountered it as well.
(Please ensure you are running the latest version of Cloud Code for IntelliJ with Help > Check for Updates)
Pycharm version:
When launching it debug mode, there's a prompt to map the project root dir to the target image. This is problematic for mono-repos and any case where the dockerized code isn't the project root.
What is the point of the debug mapping in the run configuration if it's not respected?