Breakpoints not hit when debug in VSCode #1735

Closed
opened 2024-10-31 23:56:36 -07:00 by lihappy · 2 comments
lihappy commented 2024-10-31 23:56:36 -07:00 (Migrated from github.com)

Report

Issues and Steps to Reproduce

Replaces this with steps to repro your issue.

  1. Glone the Yoga project into local, cd yoga, succeeded to run build command ".\unit_tests Debug"
  2. Open Yoga folder in VSCode, Add some breakpoints in xxxText.cpp or xxx.cpp files,
  3. Open "Run and Debug" in sidebar, Select Debug C++ Unit tests(vsdbg) and then click "Start Debugging",

this step needs a workaround to replace the && to ; in windwos command in tasks.json file.

  1. test suite was run succeeded, but breakpoints never stopped.
    [==========] 780 tests from 14 test suites ran. (107 ms total)

Environment:

Windows 11

Version: 1.95.1 (user setup)
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22621


gcc.exe (Rev1, Built by MSYS2 project) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Expected Behavior

Describe what you expected would happen.
breakpoints can be hit when debug in VSCode

Actual Behavior

Describe what actually happened.
breakpoints not work when debug in VSCode

Link to Code

If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.

When applicable, use this fiddle to post a web repro.

# Report - [ Y ] I have searched [existing issues](https://github.com/facebook/yoga/issues) and this is not a duplicate # Issues and Steps to Reproduce ***Replaces this with steps to repro your issue.*** 1. Glone the Yoga project into local, cd yoga, succeeded to run build command ".\unit_tests Debug" 2. Open Yoga folder in VSCode, Add some breakpoints in xxxText.cpp or xxx.cpp files, 3. Open "Run and Debug" in sidebar, Select Debug C++ Unit tests(vsdbg) and then click "Start Debugging", > this step needs a workaround to replace the && to ; in windwos command in tasks.json file. 4. test suite was run succeeded, but breakpoints never stopped. `[==========] 780 tests from 14 test suites ran. (107 ms total)` Environment: ``` Windows 11 Version: 1.95.1 (user setup) Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6 Date: 2024-10-31T05:14:54.222Z Electron: 32.2.1 ElectronBuildId: 10427718 Chromium: 128.0.6613.186 Node.js: 20.18.0 V8: 12.8.374.38-electron.0 OS: Windows_NT x64 10.0.22621 gcc.exe (Rev1, Built by MSYS2 project) 14.2.0 Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` # Expected Behavior ***Describe what you expected would happen.*** breakpoints can be hit when debug in VSCode # Actual Behavior ***Describe what actually happened.*** breakpoints not work when debug in VSCode # Link to Code ***If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.*** ***When applicable, use this [fiddle](https://jsfiddle.net/emilsjolander/jckmwztt/) to post a web repro.***
NickGerleman commented 2024-11-01 03:58:55 -07:00 (Migrated from github.com)

This path hasn’t been super well tested compared to building on Mac and using lldb.

I’m guessing it’s likely the tool chain used to build the binary will dictate the debugger. E.g. running CMake from visual studio command prompt will build with msvc, but if you build with mingwin/GCC you might need to use gdb.

This path hasn’t been super well tested compared to building on Mac and using lldb. I’m guessing it’s likely the tool chain used to build the binary will dictate the debugger. E.g. running CMake from visual studio command prompt will build with msvc, but if you build with mingwin/GCC you might need to use gdb.
lihappy commented 2024-11-05 23:21:57 -08:00 (Migrated from github.com)

Yes, you're correct. I changed the compiler from mingwin to MSVC, the breakpoints worked. However I also did some workarounds like close treating warnings as errors to pass building.

Yes, you're correct. I changed the compiler from mingwin to MSVC, the breakpoints worked. However I also did some workarounds like close treating warnings as errors to pass building.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1735
No description provided.