﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4475	Make it possible to actually inspect real-life debug logs in OMEdit	Francesco Casella	Adeel Asghar	"The models most likely to need debugging are non-trivial ones with significant size. The experience  with OMEdit in this case should be improved, because it is currently unacceptable IMHO.

As a test case, please consider 
{{{
ScalableTestSuite.Electrical.DistributionSystemDC.ScaledExperiment.DistributionSystemModelica_N_10_M_10
}}}

Note that this is not really a large model, it is just not a toy-sized one.

Turn on the {{{LOG_LS_V}}} flag and run the simulation.

The first problem is that sometimes the log messages are larger than the window, which unfortunately has no horizontal scroll bar, which prevents looking at the full log message. Please add a horizontal scrollbar to this window.

Now, assume I want to do some analysis on the matrix A reported by the log, using Matlab, e.g. to figure out why it is singular. I expand matrix A, select the rows of the matrix and hit Ctrl-C. The hourglass shows up, and it takes about one minute before I regain control of the whole thing. Now, this is really annoying. For larger matrices, it just takes forever, and the only way out is to send a SIGTERM signal to the process and restart the whole thing over. Please make sure this operation doesn't take more than a few seconds in the worst case.

Then, I try to paste these rows in Matlab, but a lot of extra stuff like {{{LOG_LS_V | info | <p>}}} and {{{</p>}}} shows up. Ok, I can paste this in a text editor and use global find and replace to get rid of it. However, it would be nicer to have WYSIWYG here and only get the numbers, not the extra stuff.

I now copy the cleaned-up numbers in Matlab, type {{{A=[}}} and paste the stuff, then type {{{]}}} and hit return. I get the following error message: 

{{{Error: The input character is not valid in MATLAB statements or expressions.}}}

It took me a while to figure out why, including using a hex editor. The bottom line is, all the spaces there are not the standard ASCII 32 characters, but rather more exotic ASCII 160, i.e., non-breaking space. Which Matlab doesn't like. Could we please just get plain spaces here when we copy to the clipboard?

Every now and then I would then eventually prefer to just load the whole log file in a good old text editor and work from there (e.g. to perform search operations). I tried to figure out where the corresponding .log file is in the working directory, but failed miserably. There's plenty of totally useless files (see #2909 on this topic), but I can't find that. Please add some way to easily access the textual log file from this window, e.g. starting from the context menu or adding a button to the window, or by adding a link, so that one can open it easily with his/her (serious) text editor of choice.

Last, but not least, when the log file gets really long, this windows basically hangs up, it does not allow to press the cancel button (which does not respond to user input) and the whole thing gets stuck, which is really annoying. You can test this with the {{{N_20_M_20}}} model, for example. I would suggest to put an upper limit to the size of the log file that is represented here (e.g., 1 MB, or something similar) and then put a pointer to the textual .log file at the end if the size exceeds the limit. 

If you get 100+ MB log (which is not unheard of if you turn on verbose logging on iterative solvers) that's the only sensible way to operate, this window simply cannot handle such large amounts of data. Killing the process with the Task Manager and restarting the analysis from scratch shouldn't be the only way out of this situation.

Thanks!"	enhancement	closed	blocker	1.14.0	OMEdit		fixed		
