-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
WEST_TOPDIR acquisition incorrect when using PyCharm #79927
Comments
@pdgendt can you take a look? the suggested change is in |
@LukaszMrugala can you try with #79988 to see if that helps? |
Hmn, it does not make sense to have colored output there, which it the root cause, I think. |
I've updated #79988 for west colorized output, please verify. |
More input from: tartley/colorama#307 |
I've run the PR commit locally and the problem seems to persist. |
Yes, it was later I found the underlying issue:
|
@LukaszMrugala can you add something like unset PYCHARM_HOSTED to the script you run? |
I've added |
Great, however I doubt we want to have this in tree, but you should rather integrate it into the pycharm scripts. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Describe the bug
I am trying to use Twister in Pycharm, in order to access easy-to-use debugging on Windows.
I have created a PyCharm Python Script Configuration, which launches a script under the path
<ZEPHYR_BASE>\scripts\twister
with parameters-T=<ZEPHYR_BASE>\tests\ztest -p=qemu_x86_64 -ll=DEBUG -vv
. I've input the working directory as<ZEPHYR_BASE>
. Environmental variablesZEPHYR_BASE
andZEPHYR_SDK_INSTALL_DIR
are set.Tests fail with CMake build error. CMake logs indicate Ninja lexer error. Inspecting the Ninja command, we can see the following parameter:
We can see a newline, which normally would have been removed thanks to the
OUTPUT_STRIP_TRAILING_WHITESPACE
inwest.cmake
. However, for some reason, a terminal color resetting character quartet is appended to the result, breaking both the trailing whitespace stripping, as well as the relevant Ninja command.WEST_TOPDIR
contains a newline and those characters, wherever it would be accessed.To Reproduce
west
above theZEPHYR_BASE
.Expected behavior
PyCharm configuration behaves as a CMD run of Twister.
Impact
I cannot debug Twister on Windows via the Pycharm visual debugger.
Logs and console output
Full command from
build.ninja
:Environment (please complete the following information):
Additional context
I was able to fix the problem on my machine via addition of quotation marks to the CMake command.
Before (failing):
After (passing):
I am unsure whether that's the right approach here.
The text was updated successfully, but these errors were encountered: