debugging

Debug Diagnostic Tool - Can't modify rules - “failed to start dbgsvc getlasterror returns 0x0000422”

吃可爱长大的小学妹 提交于 2020-01-24 19:26:01
问题 I was attempting to use Microsoft's Debug Diagnostic Tool (DebugDiag) to identity an Application Event Log error occurring in w3wp.exe / clr.dll, as described in this answer. However, when I attempted to add my new Rule, I got an error dialog: Cannot connect to service. Failed to start DbgSVC. GetLastError returns 0x00000422 How can I add the Rule successfully? 回答1: This error indicates that the Debug Diagnostic Service service is disabled. To fix: Start > Run > services.msc In the Services

gdb python module read memory content

雨燕双飞 提交于 2020-01-24 19:14:51
问题 Inside gdb to print the content at a particular memory address, I can ran the below command. It prints the content in hex x <memoryaddress> (gdb) x 299395816 0x11d86ae8: 0x0ec14153 I am using the gdb python module inside the gdb, what's the equivalent command to read the memory location with the gdb module inside my python script. 回答1: I guess this is what you want (gdb) python i = gdb.inferiors()[0] (gdb) python m = i.read_memory(0x7fffffffe39c, 4) # an int32 (gdb) python print(m.tobytes())

Standard way for writing a debug mode in C++

梦想的初衷 提交于 2020-01-24 15:12:33
问题 Is there a "best practice" or similar for coding in a debug-mode in one's code? For example, #include <iostream> int main() { #ifdef MY_DEBUG_DEF std::cout << "This is only printed if MY_DEBUG_DEF is defined\n"; #endif return 0; } Or is this considered bad practice because the code gets bit messier? I have noticed some libraries (for example libcurl, which is a large and well-known library) have this feature; if you define VERBOSE with libcurl you get basically a debug mode Thank you. 回答1: A

How can I get break on runtime exception(or error) in javascript (or ecmascript?)

倾然丶 夕夏残阳落幕 提交于 2020-01-24 14:46:20
问题 How can I break on error? I have a code: throw new Error("Some error"); And I'm using most recent version of Web Inspector (Webkit) and Firebug(Mozilla). These tools catch and print the error, but does not break. May I don't know the how to. Please let me know how can I to do these? 回答1: In WebKit you need to click this to enable break on error. If you click it again it will also break on warnings and clicking it again will disable it. alt text http://a.yfrog.com/img832/3580

How can I get break on runtime exception(or error) in javascript (or ecmascript?)

感情迁移 提交于 2020-01-24 14:46:09
问题 How can I break on error? I have a code: throw new Error("Some error"); And I'm using most recent version of Web Inspector (Webkit) and Firebug(Mozilla). These tools catch and print the error, but does not break. May I don't know the how to. Please let me know how can I to do these? 回答1: In WebKit you need to click this to enable break on error. If you click it again it will also break on warnings and clicking it again will disable it. alt text http://a.yfrog.com/img832/3580

How can I get break on runtime exception(or error) in javascript (or ecmascript?)

假装没事ソ 提交于 2020-01-24 14:45:06
问题 How can I break on error? I have a code: throw new Error("Some error"); And I'm using most recent version of Web Inspector (Webkit) and Firebug(Mozilla). These tools catch and print the error, but does not break. May I don't know the how to. Please let me know how can I to do these? 回答1: In WebKit you need to click this to enable break on error. If you click it again it will also break on warnings and clicking it again will disable it. alt text http://a.yfrog.com/img832/3580

Managed .NET debugger and async/await methods

╄→гoц情女王★ 提交于 2020-01-24 13:20:38
问题 I'm making a managed .NET debugger using MDBG sample. Consider some simple async example: 1: private async void OnClick(EventArgs args){ 2: var obj = new SomeClass(); 3: bool res = await StaticHelper.DoSomeAsyncStuff(); 4: if(res){ 5: Debug.WriteLine("result is True"); 6: } 7: else{ 8: Debug.WriteLine("result is False"); 9: } 10: someField = obj.Name + "is:" + res.ToString(); 11: } 12: public static async Task<bool> DoSomeAsyncStuff(){ 13: await Task.Delay(5000); 14: return true; 15: }

Error: C# Attempted to read or write protected memory

核能气质少年 提交于 2020-01-24 12:59:08
问题 im having a hard time correcting this bug, the app is tested on 4 diffrent machines and works fine on 3 of them but one vista PC gives this error when trying to open a page trough WebBrower1 anyhelp resolving this wold be very helpful to me. System.AccessViolationException occurred Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Source="System.Windows.Forms" StackTrace: ved System.Windows.Forms.UnsafeNativeMethods

Set a breakpoint inside a library jar in IntelliJ

£可爱£侵袭症+ 提交于 2020-01-24 12:12:59
问题 I am trying to set a breakpoint inside a method from a 3rd party library added to my Griffon project. During debug, the breakpoint becomes marked with an X, with the tooltip informing me that "no executable code was found". I've also tried setting the breakpoint just before the method call in my source and stepping in, but this failed to step into the library source as well. I have the library attached as jar with a source directory and set to export in Project Structure->Modules-

Set a breakpoint inside a library jar in IntelliJ

自作多情 提交于 2020-01-24 12:11:09
问题 I am trying to set a breakpoint inside a method from a 3rd party library added to my Griffon project. During debug, the breakpoint becomes marked with an X, with the tooltip informing me that "no executable code was found". I've also tried setting the breakpoint just before the method call in my source and stepping in, but this failed to step into the library source as well. I have the library attached as jar with a source directory and set to export in Project Structure->Modules-