Comments (4)
Is this really a necessary change to make? The vast majority of the user's code would have to be inside $IF blocks, as above, and all they'd need to do is add a single truth statement to the start of the program to toggle when they wanted to see the debug information or not. IE:
$LET DEBUG = FALSE
'do all sorts of stuff
$IF DEBUG THEN
Print "We are debugging"
$End If
Change that $LET from FALSE to TRUE, and the user can manually turn on that debug segment, without necessarily having to rely on the built in vWatch debugging system.
QB64 source is quite complex and longish already. I'm not certain we'd see much actual benefit to digging into and sorting an extension out for this, when it's already so easily available for an end user. ;)
from qb64pe.
Yes true. But QB64 IDE automatically wants to add $DEBUG at the top when the line column is clicked. It would be nice if we could detect this using the preprocessor rather than manually editing.
from qb64pe.
Personally I'm somewhere in-between - the suggestion seems reasonable to me, but Steve's not wrong that you can get basically the same functionality by just defining DEBUG
yourself. That said I don't actually know all that much about how $DEBUG
works, I think I should look into it a bit more.
Seeing your snippet of code, what would also be nice is if you could wrap the whole thing into some kind of DebugPrint
statement, rather than have the $if
s everywhere. You could almost get there with just a SUB, but it's not quite the same :-/ Any kind of change like that would require a fair amount more thought though :D
I would personally encourage you to give this change a shot if you feel like it. Looking at the qb64.bas code I don't think this is a hugely significant change to make, but even if we did decide to do it it's probably not something we would get to soon. I would not be opposed to adding this if we had a working version and it wasn't too complicated to add. The only thing I would suggest is make the define _DEBUG
or something so it's less likely to clash with what people might already have.
from qb64pe.
I'm with Matt on this. I'm somewhere in-between. It sounds nice but can easily be replicated with your own $LET.
from qb64pe.
Related Issues (20)
- The IDE should wait for you to release the F5 key before starting the program.
- ctime() HOT 3
- Race between `_FullScreen` and other screen-related commands
- If a timer expires while stopped it does not get triggered immediately when turned on.
- On Windows, using Sleep in Console programs will not trigger any timers.
- The `-o` flag will incorrectly strip the provided extension if it is not `.exe`
- QB64-PE fails to find symbols in a `.so` library if it only has a dynamic symbol table.
- Lack of support for multiple optional Function arguments
- Trojan:Script/Wacatac.H!ml HOT 2
- You should be able to produce a stack trace when errors happen.
- Add Native Windows on ARM (ARM64) Support for QB64PE
- Add IDE options to export the current code HOT 2
- Replace zlib with miniz
- Add Unicode option to `_CLIPBOARD$` HOT 7
- Update compile_tests.sh to allow testing C/C++ header libraries with source / $INCLUDE relative paths
- If a Type contains a variable-length String, then the other members don't get zero'd during a ReDim _Preserve
- Fix _Devices on Windows to correctly report alt+key and shift.
- v3.7.0 compile error HOT 11
- Allow UTD variables to be passed to external functions by value HOT 2
- Extra Mouse Buttons.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qb64pe.