QBJS Console - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: QBJS, BAM, and Other BASICs (https://qb64phoenix.com/forum/forumdisplay.php?fid=50) +--- Thread: QBJS Console (/showthread.php?tid=2018) |
QBJS Console - dbox - 09-20-2023 One feature that was added in the last release (that I haven't done a very good job of publicizing yet) that can help with troubleshooting is the Console library. This lets you write logging messages to the QBJS console window based on a log level. You can click the message in the log and it will take you to the corresponding line of code. If you just want to print text to the console window and you don't really care about line numbers, you can use the Console.Echo method. RE: QBJS Console - vince - 09-20-2023 this is handy if you want your QBJS mods to produce directly copy-pastable output RE: QBJS Console - bplus - 09-21-2023 (09-20-2023, 11:22 PM)vince Wrote: this is handy if you want your QBJS mods to produce directly copy-pastable output Oh, good point! RE: QBJS Console - grymmjack - 09-21-2023 (09-20-2023, 05:44 PM)dbox Wrote: One feature that was added in the last release (that I haven't done a very good job of publicizing yet) that can help with troubleshooting is the Console library. This lets you write logging messages to the QBJS console window based on a log level. You can click the message in the log and it will take you to the corresponding line of code. Awesome. I abuse the crap out of `console` in web development. This is a great addition! Quote:And thus concludes the ...LOL! Are you open to suggestions on extending in the future? Like adding a `console.dir` to dump our QB vars and objects and things? RE: QBJS Console - dbox - 09-21-2023 (09-21-2023, 12:40 PM)grymmjack Wrote: Awesome. I abuse the crap out of `console` in web development. This is a great addition!Interesting you mention that... The way it is implemented, if you export your program to a standalone html/js, all the calls to console will be written to the actual browser console. That way you can still do some basic debugging in the exported version. (09-21-2023, 12:40 PM)grymmjack Wrote: Are you open to suggestions on extending in the future? Like adding a `console.dir` to dump our QB vars and objects and things?Always open to suggestions! That's a very interesting idea. Let's add it to the list. I'm also realizing now that it would be nice to have a Console.Show and Console.Hide so that you have programmatic access to display the console window. |