debugging

Android with jdb confusion using waitForDebugger

南笙酒味 提交于 2019-12-29 07:15:12
问题 I'd like to debug my Android application on my device (Nexus One - not the emulator) using the command line. I'm confused at how to set a breakpoint using jdb in combination with android.os.Debug.waitForDebugger . Say I put the following code in my main activity onCreate : public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); android.os.Debug.waitForDebugger(); int j = 10; int r = j; } Using ddms I can see that my application is

GDB Cannot insert breakpoint, Cannot access memory at address XXX? [duplicate]

放肆的年华 提交于 2019-12-29 06:51:28
问题 This question already has an answer here : How to set earliest possible breakpoint (1 answer) Closed 2 years ago . I wrote a really simple program: ebrahim@ebrahim:~/test$ cat main.c int main() { int i = 0; return i; } And the I compiled it with -s for stripped mode: ebrahim@ebrahim:~/test$ gcc -s main.c -o f3 ebrahim@ebrahim:~/test$ file f3 f3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID

Breakpoint set by sosex.mbp or sosex.mbm not working

扶醉桌前 提交于 2019-12-29 06:10:26
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Breakpoint set by sosex.mbp or sosex.mbm not working

情到浓时终转凉″ 提交于 2019-12-29 06:10:21
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Breakpoint set by sosex.mbp or sosex.mbm not working

丶灬走出姿态 提交于 2019-12-29 06:10:12
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Breakpoint set by sosex.mbp or sosex.mbm not working

旧时模样 提交于 2019-12-29 06:10:09
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Debugging JavaScript in IE

邮差的信 提交于 2019-12-29 05:43:26
问题 I am trying to debug my JavaScript in IE but I have no idea where to start. Can anybody help me? I think it's only a small error, but the developer tools are a bit useless. An unexpected identifier error comes up when you go to http://songtagapp.com/. I think it's something to do with the tpl! plugin I am using for RequireJS, but that's all I can tell. 回答1: Several options: Open the IE developer tools (by hitting F12 while in the browser), and use the provided JavaScript debugger. To get to

How to debug python script that is crashing python

Deadly 提交于 2019-12-29 05:22:23
问题 I'm trying to help debug a python script that is causing python (2.7) itself to crashes. The script logs some info to a file and it ends at a different stop on each run, or at least what it writes out is at a different spot. The script already have a try\catch's. The script has worked previously without errors This is on Window 2008 servers, with a fair bit of RAM and when run not much CPU usage. So my question: Are there tools or techniques that could help? I see that there is a pdb module I

using catch(…) (ellipsis) for post-mortem analysis

江枫思渺然 提交于 2019-12-29 05:13:06
问题 Someone in a different question suggested using catch(...) to capture all otherwise unhandled - unexpected/unforseen exceptions by surrounding the whole main() with the try{}catch(...){} block. It sounds like an interesting idea that could save a lot of time debugging the program and leave at least a hint of what happened. The essence of the question is what information can be recovered that way (other than whatever debug globals I leave behind), and how to recover it (how to access and

android.util.Log when publishing - what can I do / not do

谁说胖子不能爱 提交于 2019-12-29 04:50:07
问题 I've got a hell of a lot of Log.i Log.d Log.e in my code for a recent app I've done. I'm about to publish this app and I don't really want people seeing it when they plug there phone into adb, but I do want it there for my own debugging. I was wanting to extend android.util.log and just have a boolean switch in there so I could just turn off the log when I publish and turn it on when developing but this class is final, am I missing a trick? I don't really want to go through my code an remove