Skip to content
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

[Feature Request] Logpoint support for cppdbg, cppvsdbg #2591

Open
joao-aguirre opened this issue Oct 2, 2018 · 26 comments
Open

[Feature Request] Logpoint support for cppdbg, cppvsdbg #2591

joao-aguirre opened this issue Oct 2, 2018 · 26 comments

Comments

@joao-aguirre
Copy link

joao-aguirre commented Oct 2, 2018

Type: Debugger

Just a quick question. Are logpoints supposed to be working for C++ debugging?

I can add the logpoint and the debugger actually stops at the point, but no message is logged (or at least I can't find it).

  • OS and Version: Windows 10
  • VS Code Version: 1.27.2
  • C/C++ Extension Version: 0.19.0
@pieandcakes
Copy link
Contributor

pieandcakes commented Oct 2, 2018

I am assuming you are talking about this?

We haven't done any work to support this yet. Are you using gdb/lldb or the Visual C++ debugger?

@pieandcakes
Copy link
Contributor

Relevant Protocol Changes: microsoft/vscode-debugadapter-node@aeda2ba

@joao-aguirre
Copy link
Author

That is exactly what I was talking about!
I'm using Visual C++ debugger.

@britalmeida
Copy link

Using gdb here, and it also looks like logpoints are doing the exact same as regular breakpoints.

@dreignier
Copy link

Same issue for me.

  • gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
  • GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git

Visual studio code "about":
Version: 1.33.1
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:20:22.771Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-46-generic

@dwlsalmeida
Copy link

Also affected. Very confused until I found this.

@JoeyRxy
Copy link

JoeyRxy commented May 3, 2019

please support logpoint.thx

@djadeja
Copy link

djadeja commented Sep 15, 2019

Please, support logpoint.
Thanks

@djadeja
Copy link

djadeja commented Sep 15, 2019

Please provide primary information, for doing analysis on how can it be added in C/C++ Debug Adapter. So, that it can be added by community developers or users.

@pieandcakes
Copy link
Contributor

@djadeja Our repository contains details on how to debug MIEngine which is what drives the debug adapter.

@guestieng
Copy link

guestieng commented Apr 6, 2020

Can the current state of this issue be made clearer?
I am referring to unexpected behaviour described in #5247 (comment),
i.e. still facing the problem of erroneous, respectively missing, logging functionality with Visual C++ debugger (MSVC, cppvsdbg !).
So is there any solution/workaround for this problem already?
(as I understand, the debug MIEngine does only help for gdb/lldb, isn't it?)

@pieandcakes pieandcakes changed the title Logpoint [Feature Request] Logpoint support for cppdbg, cppvsdbg Apr 6, 2020
@anmace
Copy link

anmace commented May 14, 2020

I am seeing this issue in VS Code version 1.44.2. I am trying to debug an accessibility bug using Narrator but instead of logging text, the log breakpoints are breaking like regular breakpoints and are taking focus away from the Window and Narrator starts reading the VS Code window instead. I need to keep Narrator's focus on the Window I am debugging the entire time, otherwise it is impossible for me to properly debug Narrator's behaviour.

This really seems like a bug with log breakpoints rather than a feature request. Are log breakpoints working at all for others in C++ VS Code at the moment? Can this please be fixed soon? It is really impacting my ability to debug accessibility bugs because it steals focus.

@jasjivsk
Copy link

Could dprintfs use as setting logpoints?

https://doc.ecoscentric.com/gnutools/doc/gdb/Dynamic-Printf.html

@jasjivsk
Copy link

As dprintfs will not break the execution of the code and print the statements on the debug console.

@anmace
Copy link

anmace commented May 22, 2020

Thanks, I will try using dprintfs

@jasjivsk
Copy link

@pieandcakes, Could dprintfs be implemented in vscode as logpoints?

@bshoshany
Copy link

Adding to this issue because I'm having the same problem... Logpoints work perfectly with GCC (print a log message to the Debug Console and do not break execution), but with MSVC they just act as regular breakpoints (do not print a log message to the Debug Console and do break execution).

Version: 1.51.1 (user setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19042
C/C++ extension version: 1.1.3

@simonrenger
Copy link

Same as @bshoshany

@webewildered
Copy link

for a workaround, I wrote an extension that can make the equivalent of logpoints without language support: https://marketplace.visualstudio.com/items?itemName=MaxAbernethy2.scriptpoints

@saschanaz
Copy link

@webewildered Interesting, it does work. Thanks!

@bshoshany
Copy link

Hi, I'm reviving this issue because with GCC 11, logpoints do not work anymore. They just act as regular breakpoints. Logpoints did work with GCC 10 in the past (as I wrote above), but they no longer work now. It would be great if this could be fixed, as logpoints are very useful debugging tools!

@saschanaz
Copy link

#8065 says there was a regression, maybe try downgrading the extension?

@bshoshany
Copy link

Ah, I see. So this has nothing to do with me upgrading to GCC 11, it's a problem in the extension itself. Never mind then.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Sep 28, 2021

@bshoshany @saschanaz GCC 11 logpoints should work with https://github.com/microsoft/vscode-cpptools/releases/tag/1.7.0-insiders ...well, assuming you have a Linux OS that supports glibc 2.27 (i.e. Ubuntu 18, Debian 10, CentOS 8, etc. or newer), if the language service is also used.

@Raildex
Copy link

Raildex commented Jul 12, 2022

Any news on this?
cppvsdbg still has no logpoint support

@mohamedmansour
Copy link

Would still love to see cppvsdbg with logpoints, for Chromium development we basically revert to windbg to debug similar logpoints, if vscode has it, it would be so wonderful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests