SRL Archive - Suggestions

Tabbed Debugging


The Claw

2009-12-18 07:57:22

Just an idea, instead of having only the one debug box, could it be tabbed for each script you have open? So if you make a new script tab it would automatically create the new debug-tab. Could be useful…would save alot of copy-pasting to notepad when scripting and you dont feel like scrolling through pages of debug info.

Wizzup?

2009-12-18 08:41:17

From: The Claw
Just an idea, instead of having only the one debug box, could it be tabbed for each script you have open? So if you make a new script tab it would automatically create the new debug-tab. Could be useful…would save alot of copy-pasting to notepad when scripting and you dont feel like scrolling through pages of debug info.


Yeah, we've been thinking about that for quite some time… So assign one debug to each tab? Not too hard I guess. :)

mastaraymond

2009-12-18 08:42:19

Ehm.. Or can we just place those debugs on the script editor page?

Naike

2009-12-18 09:26:20

Just an thought..

Have three debugs for each tab window so each script could always output
Debug info in one, Report in another, and Progressing info in the 3rd.
and, possibly, four, one for the SRL include to debug info. (Or simply an "add" button).

It'll help both scripters and coders in such way that ANY script will get debugged(if you work with it wisely) and bugs can be solved so much better.

The Claw

2009-12-18 09:33:56

How about: 1 tab per script, with a drop down box deciding what to show in the debug. All is all, report is report, etc. And prefix each message with where its coming from, possibly a different colour? And timestamp. For example, "All" might show this:

00:00:00 -
Initialising
00:00:01 - [SRL] Not a valid gametab
01:00:00 - [Script] ——Sudoku!
01:00:00 - [Script] ——Solved 1 million sudokus
01:00:00 - [Script] ——Earnt >9000m gp
01:00:00 - [Script] ——Break in 1 minute
04:00:00 -
Finished


Where "Simba" would show only:

00:00:00 -
Initialising
04:00:00 -
Finished


Just a bit neater than multiple tabs per script

mastaraymond

2009-12-18 10:37:16

Not sure if we can do colors with the current component, but it looks hot!

Nava2

2009-12-18 11:58:31

I like the idea.. why not have functions to create new Debug Tabs, then you can call ``WritelnEx(tabNum: Integer, Text: String);'' Would allow for SRL to have its own tab for debug which would be really nice.

Boreas

2009-12-18 23:13:58

From: The Claw
How about: 1 tab per script, with a drop down box deciding what to show in the debug. All is all, report is report, etc. And prefix each message with where its coming from, possibly a different colour? And timestamp. For example, "All" might show this:



Where "Simba" would show only:



Just a bit neater than multiple tabs per script

Agreed.

Widget

2009-12-19 02:45:37

Unless the debug box could be part of the tab (like when you switch the tab the debug box changes with the script syntax editor). Just make sure that things like color picking go on all the debug boxes.

mixster

2009-12-19 12:19:37

To be honest I dislike the debug box in regards to its name. I think there should be one global error box that outputs errors from all scripts (compilation and runtime) then there should be an output box for everything else (just one for everything, one for a tab or whatever), ie progress reports, all script writeln's and the like. With SRL producing a standardized progress report, building the random information into that rather than the report box would mean that there is virtually no use of the report box at all.

mastaraymond

2010-04-15 05:36:19

We definitely need something like this..

Wizzup?

2010-04-30 05:45:17

From: mastaraymond
We definitely need something like this..


We'll then need:
One tab per opened tab. (Perhaps per started script, as it should close at some point, but closing as soon as the script stops doesn't sound like a good idea…)
Colours? I'm not sure if they are supported in a TMemo.

ShowerThoughts

2010-04-30 07:58:10

Good idea, but why not just… each script a tab? then that system like the claw said.

offtopic: Seriously this Simba might get me scripting again, I´ve got that wrong feeling again xD.

mastaraymond

2010-04-30 08:04:00

Definitely want multiple debug boxes per script.. So; I guess every script-tab should get its own debug-tab? If you know what I mean..

Awkwardsaw

2010-04-30 09:13:13

but, will we have an option to have the debug in the same window as script, like a toggle button? when i'm debugging a script i would hate to have to switch windows every time i need to make a change

Wizzup?

2011-01-09 06:59:56

I'm willing to implement something like this, we'll need a proper idea of how we actually want it.

@All: Please describe in words how you'd expect it to work. I'm pretty sure there are at least three totally different interpretations of this idea. We need to come up with a good implementation idea before we actually implement it.

Dgby714

2011-01-15 20:08:17

I want to re bring this up as I'm currently working on it and would like some input.

My current version is working, It adds TScriptFrame.Debug: TMemo, and when switching script tabs does TScriptFrame.Debug.BringToFront. (This is a crappy way of doing it)

After reading some of the suggestions on here Im gonna rethink it and add a few tabs (Debuging, Errors)?

Nava2

2011-01-16 00:20:46

From: Dgby714
I want to re bring this up as I'm currently working on it and would like some input.

My current version is working, It adds TScriptFrame.Debug: TMemo, and when switching script tabs does TScriptFrame.Debug.BringToFront. (This is a crappy way of doing it)

After reading some of the suggestions on here Im gonna rethink it and add a few tabs (Debuging, Errors)?


Why not just use the ``visible'' property?

Dgby714

2011-01-16 00:44:46

From: Nava2
Why not just use the ``visible'' property?


I could of used that but BringToFront was easier…. You would have to set the last ScriptFrames Debug.Visible to false and set the current one to true.

The whole idea is crappy.

The Claw

2011-01-16 00:49:46

From: The Claw
How about: 1 tab per script, with a drop down box deciding what to show in the debug. All is all, report is report, etc. And prefix each message with where its coming from, possibly a different colour? And timestamp. For example, "All" might show this:



Where "Simba" would show only:



Just a bit neater than multiple tabs per script


How about like this, except:

One debug box per script with checkboxes next to it determining what types of debug to display? Could have inbuilt ones in Simba and 1 or 2 custom per script, debug like Writeln('asd', Simba) or Writeln('asd', SRL), or Writeln('asd', ScriptCustom1) etc. Then you could show different combinations of debug at different times, its more customisable than a drop down box.

TomTuff

2011-01-16 05:36:47

I think it should be done like this:
Some debugging would always be visible (e.g. something very vital happening in one script that needs attention ASAP), and other is only visible in its own tab. If you want to view every line of debugging at once, check a "View All" box.