console.clear()
-
clear console...
Simple but needed
-
This feature is on our roadmap.
At the moment without a clear function Screeps is a memory leak waiting to happen, it’s a problem. Something went wrong in my code last night, before I went to bed I had multiple tabs open exploring rooms manually and something went wrong in my code and when I woke up every tab was using about 1GB of memory from console messages.
Console should show only last 300 lines at the moment. Are you sure this leak was due to console history?
-
> This feature is on our roadmap.You 'da best. Thanks!
-
@Artem I'm not exactly sure what causes the memory leaks then... I've been playing for a few hours. I started off at 200,000 K memory usage and now I'm up to 932,000 K. I just assumed it was the console building up.
Using the Steam version.
-
It might be caused by another reasons. Some of them are fixed in the yesterday's patch.
-
+1 on this, It would be very handy.
-
The console clearing feature has been just added.
-
> The console clearing feature has been just added.
How do I use it? Haven't found in the API. Or did you mean the button in the UI?
-
> The console clearing feature has been just added.
How do I use it? Haven't found in the API. Or did you mean the button in the UI?
You can inject javascript into the console.log. So you can basically call the UI function yourself. This worked for me.
function clearLog(){
console.log("<script>angular.element(document.getElementsByClassName('fa fa-trash ng-scope')[0].parentNode).scope().Console.clear()</script>")
}
-
> The console clearing feature has been just added.
How do I use it? I can't find anything in the documentation.
console.clear(); does not work.
-
So what's the command? Anybody found out in the last 7 month since the feature (allegedly) got implemented?