Here is the code I have:
import pickle
alist = ['here', 'there']
c = open('config.pck', 'w')
pickle.dump(alist, c)
and this is the error I receive:
Traceback (most recent call last):
File "C:\pickle.py", line 1, in ?
import pickle
File "C:\pickle.py", line 6, in ?
pickle.dump(alist, c)
AttributeError: 'module' object has no at...
More exactly -- how to do it in a standard way?
I like the way VS trace exceptions caused by my program, so when running it from VS it has no sense for me to use my own mechanism for handling and displaying exceptions. Of course when the program is executed as a standalone app, I have to rely on my piece of exception handler.
I know, I...
Hello,
I'm having some troubles debugging a solution which contains both a native ANSI C DLL project and a managed C#/WPF application project.
I call the functions exported by the DLL using the LoadLibrary/GetProcAddress Win32 API functions (DllImport attribute is not applicable for my program as the DLL is selected by the user). Both ...
When working with third party systems, especially very configurable systems that dynamically load providers, controllers, components and so on, I sometimes just want to know when a certain object or class is accessed. Normally, I'd place a breakpoint on any potential lines in my source (a nuisance, but it works), but if source is not ava...
I have the source code for a C# project (which wasn't written by me) which I run on one of our servers.
There is a particular part of this program (a menu option) which occasionally fails silently and I can't figure out why from just looking at the source. (The part of the program that fails requires various features that are not on my ...
Im a developer for a major company and we are facing a nasty crash scenario.
Some background
the application is fundamentally a message processing system.
The aplication has a large in memory dataset shared across several threads.
Access to the dataset is syncronised (usually)
The in memory dataset contains several tables
Most message...
How can I put break points in an HTML page in javascript functions to see values of variables as lines get executed. What is the easiest way of doing so?
thanks
...
I'm looking to write a tool that aims to convert debug symbols of one format to another format that's compatible for use under GDB. This seems like a tedious and potentially complex project so I'm not exactly sure how to tackling it.
Intially I'm aiming to convert the Turbo Debug Symbol table(TDS) emitted from borland compilers into so...
Please share with us your favorite, and most general, PRINT or DEBUG macro
applicable to all (or almost all) variables in different types and to arrays in C. The macro
can have any number of parameters (though 1-3 are preferred); if it increases
descriptive power at all, C99 features can be assumed.
#define PRINT(var, ...) \
...
L...
I want to debug TCP/IP interactions for a program I'm enhancing. I don't have root access (so no tcpdump etc), but the app runs under my own id. I could use e.g. strace to intercept the system calls, but are there alternatives worth recommending over that? If so, why - what do they offer? Command line prefered (no X server installed ...
I've created a Windows/C++/WTL application that spawns a child process. The two processes communicate via anonymous pipes.
I'd like to be able to debug the child process.
Since both parent and child projects are in the same solution in Visual Studio 2008, is there any way to tell VS2008 that I'd like the debugger to debug both proce...
I have a workspace with the following 3 projects:
Library
Tests
GUI
The tests only hit the library. This is a BB project with the type set to "library"
All my tests seem to be working and hitting the code. If I debug the tests using JUnit, I can step in to a function in my library, view my variables and all the normal debugging goodn...
Is there a way to drop into the debugger when any panic occurs like if there were a breakpoint?
I'm using Carbide.c++ 2.3.0. I know about the Debug Configurations > x86 Exceptions, but it covers only a small fraction of what can actually happen in a real application. For instance, it does not trap user panics, or ALLOC panics when app...
Do I have to go over all the program using F11 and F10 . Can't I just mark where I want to go and start from there ?
...
Using MRI 1.9
When an exception is raised that causes a backtrace to be printed, it would often be immensely easier to debug if the backtrace showed the receiver and values of method parameters as well as the method name. Is there any way of doing this?
Think about situations such as passing a nil deep into library code that wasn't ex...
Got a big MFC C++ project. Our VS version is 2008. It loads a regular dll (for some optional functionality) and calls exported functions from it. When debug through the MFC app and get to the point where we call the exported function you can't step into the dll function. Is there a way to get debugging inside the dll functions. Eve...
I have an ArrayList, which includes a number of items I want to remove. I have the ids of the items to remove stored in another list. Figured the following code should work trivially, but for some reason, the remove() calls are returning a false value:
ArrayList<Integer> toRemove = new ArrayList<Integer>();
ArrayList<JCheckBox> al...
When I run Valgrind on my code, I get several thousand instances of
12 bytes in 1 blocks are possibly lost in loss record 545 of 29,459
at 0x7FCC050: operator new(unsigned int) (vg_replace_malloc.c:214)
by 0x87E39B1: __gnu_cxx::new_allocator<T>::allocate(unsigned int, void const*) (new_allocator.h:89)
...
...
From various ...
Is there any tool to log the execution path of functions that a program goes through?
I know gdb can show the backtrace at a particular point. But I want to see the whole story of a program. For instance:
int main(){
a();
b();
}
void a(){
c();
}
The tool gives out something like:
a-----
c------
b------
...
I want to debug the whole flow of a java program .What is the difference between F5 and F6 in eclipse view in this case.
...