Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Println output is truncated #41

Open
RichB opened this issue Aug 18, 2015 · 4 comments
Open

Println output is truncated #41

RichB opened this issue Aug 18, 2015 · 4 comments

Comments

@RichB
Copy link

RichB commented Aug 18, 2015

I've tried this in 3 different browsers (Chrome, Firefox, Midori) with the same results. On Ubuntu 14.10, using console version 1.5.5 with Grails 2.3.10. Enter this in the debug console window and press Ctrl-Enter or click the Execute button:

println "This is the time for all good men"
println "to come to the aid of their country"

Output window shows:

This is the time for all good men
t
≫null [22 ms]

Seems that anything after the first println gets truncated and not always to the same lengths. I originally saw this in 1.5.2 and thought upgrading would fix it. Have been using this plugin for a few years and never saw this before.

@sheehan
Copy link
Owner

sheehan commented Sep 15, 2015

I'm not sure why this would be. I've never seen it. It might have something to do with the system out interceptor. I just pushed a new version that has an out variable bound. Can you try using out.println instead of println and see if that makes a difference?

@RichB
Copy link
Author

RichB commented Oct 7, 2015

No difference with 1.5.6 using either println or out.println. Other observations: it seems to output fully whatever I put in the first line, but playing with the length of the lines creates some odd results. I don't quite see a pattern in it. Are you able to reproduce this, or is it just happening to me?

@sheehan
Copy link
Owner

sheehan commented Oct 8, 2015

No, I can't reproduce. Can you check in the developer tools and see if the full output is being returned in the XHR response?

@RichB
Copy link
Author

RichB commented Oct 8, 2015

Odd. So it must be something with my system or with our particular Grails project. I'll try it on another box and/or project soon. The form data XHR request (unparsed) is:

autoImportDomains=false&code=println+%22Now+is+the+time%22%0Aprintln+%22For+all+good+men%22

The output response is:

{"totalTime":27,"output":"Now is the time\n\n","result":"null"}

I'm also getting this error in my Grails window. I doubt it is related but including it for completeness:

ERROR resource.ResourceMeta  - Resource not found: /plugins/console-1.5.6/dist/release/backbone.marionette.map

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants