Bug 156971 - Basic IDE should have an internal debug console (as Debug.Print in VBA)
Summary: Basic IDE should have an internal debug console (as Debug.Print in VBA)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.6.0.2 rc
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: BASIC-IDE
  Show dependency treegraph
 
Reported: 2023-08-28 14:29 UTC by Rafael Lima
Modified: 2024-09-04 13:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Image showing the debug console in MS VBA (47.63 KB, image/png)
2023-08-28 14:29 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-08-28 14:29:11 UTC
Created attachment 189202 [details]
Image showing the debug console in MS VBA

In MS VBA there is a very useful feature to quickly debug code. You can open the "Immediate Window" and use the command "Debug.Print" to quickly print to a debug console.

See attached image for an example of how it works.

So I propose we add to the Basic IDE a Console window to which programmers can print using "DebugPrint" calls.
Comment 1 Regina Henschel 2023-08-28 15:53:27 UTC
Yes, an output window would be a useful improvement.
Comment 2 Roman Kuznetsov 2023-08-30 11:50:02 UTC
Agree
Comment 3 rehierl 2024-09-03 20:14:16 UTC
One of the fundamental features I am missing.

On a side note:

The "Immediate Window" allows to do even more than just to show "Debug.Print" messages. It has a single input line which allows to evaluate simple expressions. If you enter "?variableName" or "?object.propertyName", it will output the current value of that variable/property. Combined with an output window that can be attached to the side, this is especially useful to inspect a variable that holds the contents of (e.g.) an entire text file, or even the progress of a long-running macro.

However, a basic view of a cyclic output buffer would still be a much needed improvement.
Comment 4 Rafael Lima 2024-09-04 13:18:49 UTC
(In reply to rehierl from comment #3)
> The "Immediate Window" allows to do even more than just to show
> "Debug.Print" messages. It has a single input line which allows to evaluate
> simple expressions. If you enter "?variableName" or "?object.propertyName",
> it will output the current value of that variable/property.

Can't this be achieved via the "Watched Expressions" window? (View - Watched Expressions).

You can enter any expression and it will be shown when a breakpoint is hit.