microsoft / microsoft/vscode-cpptools
[cppvsdbg] The condition for a breakpoint failed to execute if expression is a string
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Setup a valid conditional breakpoint and got an exception or debugger stops every time in the breakpoint set. The expected result is to stop just once. Condition is valid, evaluated in debug console.
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};
string text ;
for (const string& word : msg)
{
cout << word << " ";
text = word; //breakpoint here expression: text=="from"
if (word=="from")
{
cout << " -> ";
}
}
cout << endl;
}
Version: 1.46.1 (system setup)
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363
- C/C++ Extension Version: 0.28.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with cppvsdbg using the provided C++ sample and the conditional breakpoint expression text=="from". Inspect the conditional breakpoint evaluation path for string expressions, then verify that a valid condition stops only once rather than raising an exception or stopping on every hit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100