473,549 Members | 2,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 882
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
1197
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 directory which is pretty long and expressed relative to the project (with ..\..\ and directory names).
3
2691
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 directories contain a file named "cppfile1.h". In my main project I #include "cppfile1.h". I rely on the order of paths in additional include...
3
5141
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': G:\Projects\Datastructure\Queue\main.cpp:16: undefined reference to `Queue<char>::Queue()' G:\Projects\Datastructure\Queue\Debug\main.o(.text+0x394): In function...
1
1910
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 normal/better to just go ahead and include that project in the solution? I'm thinking I would prefer the prior because we have alot of projects and most...
0
7526
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7723
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7817
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6051
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5092
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.