debugging

Macros and how to trace them

泪湿孤枕 提交于 2020-01-21 23:51:24
问题 The trace macro is very useful for debugging. But it comes to a halt, when used upon any macro. Like if I try to do the following : CL-USER> (trace push) Then, it'll give an error saying: can't use encapsulation to trace anonymous function #<FUNCTION (MACRO-FUNCTION PUSH) {100053FB9B}> [Condition of type SIMPLE-ERROR] Well, that's obvious because the clhs page of trace, clearly defines it upon functions. So, what is the reason for not having any facility for tracing macros in Common Lisp? Is

Macros and how to trace them

﹥>﹥吖頭↗ 提交于 2020-01-21 23:51:06
问题 The trace macro is very useful for debugging. But it comes to a halt, when used upon any macro. Like if I try to do the following : CL-USER> (trace push) Then, it'll give an error saying: can't use encapsulation to trace anonymous function #<FUNCTION (MACRO-FUNCTION PUSH) {100053FB9B}> [Condition of type SIMPLE-ERROR] Well, that's obvious because the clhs page of trace, clearly defines it upon functions. So, what is the reason for not having any facility for tracing macros in Common Lisp? Is

Laravel's dd() equivalent in django

北战南征 提交于 2020-01-21 06:21:28
问题 I am new in Django and having a hard time figuring out how to print what an object have inside. I mean type and value of the variable with its members inside. Just like Laravel's dd(object) function. Laravel's dd() is a handy tool for debugging the application. I have searched for it. But found nothing useful. I have tried pprint() , simplejson , print(type(object) and {% debug %} . But none of them could provide the required information about an object. Here is a sample output from Laravel's

Why is my Debug.Write broken?

丶灬走出姿态 提交于 2020-01-21 05:33:56
问题 Can somebody explain why my Debug.Write stops working for no apparent reason - no output is visible? This has happened to me many times in Visual Studio 2008 (never on 2005), on both Windows XP, Windows 2003 Server and Windows 7. It is per project and at the same time (on Windows 2003 server), I have projects where Debug.Write works and does not work. Currently, on Windows 7 I have no debug output at all. I create a new windows forms project, put Debug.Write("bla") in Form_Load run it, and

Output debug via printf on a Cortex-M3 CPU, stalls at BKPT instruction + confusion about JTAG and sw ports

∥☆過路亽.° 提交于 2020-01-21 05:16:30
问题 I have a Keil ULINK2 USB emulator box attached to the JTAG connector on my board, which is working fine with the Cortex-M3 CPU onboard (TI/Stellaris/LuminaryMicro LM3S series). It seems that both a JTAG and a SWJ-DP port share the same pins (and thus connector on your board) on these CPUs. One appears not to have ITM (printf) capability, the other does. The previous firmware people have always used stdio to UART (serial port), but I need the serial port freed up so that debug messages do not

Machine dependent _write failures with EINVAL error code

限于喜欢 提交于 2020-01-21 03:43:10
问题 This has some lengthy background before the actual question, however, it bears some explaining to hopefully weed out some red herrings. Our application, developed in Microsoft Visual C++ (2005), uses a 3rd party library (whose source code we luckily happen to have) to export a compressed file used in another 3rd party application. The library is responsible for creating the exported file, managing the data and compression, and generally handling all errors. Recently, we began getting feedback

Attaching a process with pdb

北慕城南 提交于 2020-01-19 04:41:06
问题 I have a python script that I suspect that there is a deadlock. I was trying to debug with pdb but if I go step by step it doesn't get the deadlock, and by the output returned I can see that it's not being hanged on the same iteration. I would like to attach my script to a debugger only when it gets locked, is it possible? I'm open to use other debuggers if necessary. 回答1: At this time, pdb does not have the ability to halt and begin debugging on a running program. You have a few other

How do I pass a command line argument while starting up GDB in Linux?

女生的网名这么多〃 提交于 2020-01-19 02:34:25
问题 I have to debug a program that has errors in it as part of my assignment. However, I must first pass command line arguments in order to solve this problem. I do: gdb -tui InsertionSortWithErrors which works, but after that I don't know how to pass arguments. I used gdb -help and it says something about --args which I also tried and it didn't work. I want to be able to get the debugger+the GUIand pass command line arguments. 回答1: Once gdb starts, you can run the program using "r args ". So if

How to debug an apache virtual host configuration?

荒凉一梦 提交于 2020-01-19 01:56:29
问题 Once again, I have a problem with my apache virtual host configuration. (The default configuration is used instead of my specific one). The problem is not really the misconfiguration but how to solve it. Does anyone has good advices to do resolve this kind of problem quickly? Some more informations. The default conf file is this one: NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory>

User Activity Logging, Telemetry (and Variables in Global Exception Handlers)

你。 提交于 2020-01-18 16:36:40
问题 Background: I am dealing with a very old app that generates Exceptions quite rarely and very intermittently. Current Practices: Typically we programmers deal with rare unknowns using Global Exception handlers, wiring up something like this: [STAThread] [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)] private static void Main() { Application.ThreadException += new ThreadExceptionEventHandler(UIThreadException); Application.SetUnhandledExceptionMode