debugging

How to display stuff in VS Code debug console without `std::endl`?

百般思念 提交于 2020-05-30 07:51:06
问题 When debugging an app using std::cout to print something, nothing appears in the debug console (3rd tab, not external console). One of the exceptions seems to be the use of std::endl : #include <iostream> #include <Windows.h> using namespace std; int main() { while(true) { Sleep(500); std::cout << "Hello world!" << std::endl; // Works } } #include <iostream> #include <Windows.h> using namespace std; int main() { while(true) { Sleep(500); std::cout << "Hello world!\n"; // Doesn't work // std:

V8 native syntax in Chrome

风格不统一 提交于 2020-05-30 07:45:12
问题 Nodejs has special flag --allow-natives-syntax . Is it possible to pass such thing to Google Chrome? Or maybe devtools provide some other way to access such information? // running node with `--allow-natives-syntax` flag var obj = { a: true, b: false }; console.log(%HasFastProperties(obj)); // true (Fast mode) delete obj.a; console.log(%HasFastProperties(obj)); // false (Dictionary mode) 回答1: Yes, you can pass that flag to Google Chrome if you start Chrome with --js-flags="--allow-natives

V8 native syntax in Chrome

我只是一个虾纸丫 提交于 2020-05-30 07:44:05
问题 Nodejs has special flag --allow-natives-syntax . Is it possible to pass such thing to Google Chrome? Or maybe devtools provide some other way to access such information? // running node with `--allow-natives-syntax` flag var obj = { a: true, b: false }; console.log(%HasFastProperties(obj)); // true (Fast mode) delete obj.a; console.log(%HasFastProperties(obj)); // false (Dictionary mode) 回答1: Yes, you can pass that flag to Google Chrome if you start Chrome with --js-flags="--allow-natives

TSX: Get the address that caused the abort

本小妞迷上赌 提交于 2020-05-29 07:46:50
问题 From another question, clearly the Intel TSX read/write set is hidden. And this is understandable, especially since it allows them to screw with design and implementation and possibly try things like bloom filters or whatever. But when a transaction aborts, it would be good to see what address - or cache line - caused it (when such a thing was the reason for the abort). Is the address exposed anywhere? 回答1: After talking to folks at Intel, there is no way to do this [citation]. The address is

TSX: Get the address that caused the abort

佐手、 提交于 2020-05-29 07:46:06
问题 From another question, clearly the Intel TSX read/write set is hidden. And this is understandable, especially since it allows them to screw with design and implementation and possibly try things like bloom filters or whatever. But when a transaction aborts, it would be good to see what address - or cache line - caused it (when such a thing was the reason for the abort). Is the address exposed anywhere? 回答1: After talking to folks at Intel, there is no way to do this [citation]. The address is

Do not use proxy on android 9 pie

╄→尐↘猪︶ㄣ 提交于 2020-05-28 03:29:15
问题 I just upgraded my Samsung Note 8 phone to Android OS 9.0 When I go to advanced wifi settings, I choose to use Proxy mode manually. Host: 192.168.1.8 Port: 8888 On the computer I turned on the Fiddler software to catch the packets. However, I could not catch any packets coming out from the phone. Before that I was using Android OS 8.0. I can still capture the packet using Fiddler Does Google have better security on Android 9.0 回答1: Not sure about your exact set up. I can recommend the

Do not use proxy on android 9 pie

随声附和 提交于 2020-05-28 03:29:08
问题 I just upgraded my Samsung Note 8 phone to Android OS 9.0 When I go to advanced wifi settings, I choose to use Proxy mode manually. Host: 192.168.1.8 Port: 8888 On the computer I turned on the Fiddler software to catch the packets. However, I could not catch any packets coming out from the phone. Before that I was using Android OS 8.0. I can still capture the packet using Fiddler Does Google have better security on Android 9.0 回答1: Not sure about your exact set up. I can recommend the

pdb bypass error/Jump failed: can only jump from a 'line' trace event

那年仲夏 提交于 2020-05-27 04:32:46
问题 I'm trying to debug a Python program using pdb. The program could be like this: def main(): a = 1 print(b) c = 2 d = 3 Apparently, print(b) is a typo which should be print(a) but it is not important and I can fix it with the text editor but I want to bypass this error and continue debugging. I tried jump, like jump 4(assuming "c=2" is line 4) but I was given error "Jump failed: f_lineno can only be set by a line trace function", which means I need to give a line trace function when I'm

What does green debugger pointer mean in VS Code?

房东的猫 提交于 2020-05-26 12:05:34
问题 As compared to a normal yellow position pointer during a debug session, what does the green arrow mean? 回答1: I think it's when Javascript is hoisting variables. I learnt it from this Udemy course ( you can preview the video). https://www.udemy.com/course/understand-javascript/ The Execution Context - Creation and Hoisting 来源: https://stackoverflow.com/questions/51940362/what-does-green-debugger-pointer-mean-in-vs-code

What does green debugger pointer mean in VS Code?

一笑奈何 提交于 2020-05-26 12:05:25
问题 As compared to a normal yellow position pointer during a debug session, what does the green arrow mean? 回答1: I think it's when Javascript is hoisting variables. I learnt it from this Udemy course ( you can preview the video). https://www.udemy.com/course/understand-javascript/ The Execution Context - Creation and Hoisting 来源: https://stackoverflow.com/questions/51940362/what-does-green-debugger-pointer-mean-in-vs-code