473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

how to include a tiny debug feature in my project ?

hello,

I've large program based, with a GUI based on wxPython,
where the user can add small parts, which I call Bricks.
A new Brick is created by inheriting from the standard-Brick.
The user should only override 1 or 2 functions from the standard-Brick.
The main properties used in those 2 functions have fixed names.
Now I've not a good idea, how I should debug that new-Brick.

Because I don't want to crash the program,
by bugs in the new-Brick,
I put the call to the overriden functions in new-Brick in a try-except statement.
So it won't generate errors,
and besides that,
debugging GUI is a crime,
and I certainly don't want the user to digg into the large program.

So I'm thinking of another approach:
- locate the 2 functions of the new-Brick
- execute them line by line through a exec-statement
- give a print statement of the most important parameters,
after the execution of each line
(The number of lines written by the user will be at most 20 lines)

Is this a good approach ?
If so, how can I execute each line separate ?
If not, what other approach should I use ?

thanks,
Stef Mientki

Dec 13 '07 #1
1 881
Stef Mientki wrote:
hello,

I've large program based, with a GUI based on wxPython,
where the user can add small parts, which I call Bricks.
A new Brick is created by inheriting from the standard-Brick.
The user should only override 1 or 2 functions from the standard-Brick.
The main properties used in those 2 functions have fixed names.
Now I've not a good idea, how I should debug that new-Brick.

Because I don't want to crash the program,
by bugs in the new-Brick,
I put the call to the overriden functions in new-Brick in a try-except
statement. So it won't generate errors,
and besides that,
debugging GUI is a crime,
and I certainly don't want the user to digg into the large program.

So I'm thinking of another approach:
- locate the 2 functions of the new-Brick
- execute them line by line through a exec-statement
- give a print statement of the most important parameters,
after the execution of each line
(The number of lines written by the user will be at most 20 lines)

Is this a good approach ?
If so, how can I execute each line separate ?
If not, what other approach should I use ?
See the module trace.

Diez
Dec 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Francois | last post by:
Hi, I think I found a bug with VS, and I've included a project example of the problem I got. I've got a project deep into a set of folders. The project have an additional include library...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
3
by: Kceiw | last post by:
Dear all, When I use #include "queue.h", I can't link it. The error message follows: Linking... G:\Projects\Datastructure\Queue\Debug\main.o(.text+0x136): In function `main':...
1
by: Ronald S. Cook | last post by:
If I choose not to include a dependent project in my solution, but rather just reference the .dll in that project's bin\debug folder, are there any negative repercussions? Or, is it more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.