KomodoEdit icon indicating copy to clipboard operation
KomodoEdit copied to clipboard

No autocomplete for console object in JS files

Open Defman21 opened this issue 9 years ago • 23 comments

I don't know why there isn't an auto-complete for console.* object. Also I cannot find console object in window object.

Defman21 avatar Apr 06 '15 14:04 Defman21

Works fine for me? Open a blank javascript file and type console..

Naatan avatar Apr 06 '15 16:04 Naatan

Are you sure you choose JavaScript? (not NodeJS)

Defman21 avatar Apr 06 '15 16:04 Defman21

Yep.

Naatan avatar Apr 06 '15 16:04 Naatan

[2015-04-06 19:33:25,034] [ERROR] koCodeIntel:     INFO: eval 'console' at Text-1.txt#1  <Trigger 'javascript-complete-object-members' at 8>
    INFO: start scope is (<blob 'Text-1.txt'>, [])
    INFO: find 'console' starting at (<blob 'Text-1.txt'>, [])
    INFO: is 'console' accessible on (<blob 'Text-1.txt'>, [])? no
    INFO: is 'console' accessible on (<blob '*'>, [])? no
    INFO: is 'console' accessible on (<blob '*'>, ['Window'])? no
    INFO: lookup 'console' in <JavaScript curdirlib>
    INFO: lookup 'console' in <JavaScript cataloglib: HTML5, Komodo, XPCOM, jQuery>
    INFO: lookup 'console' in <javascript stdlib>
    ERROR: evaluating 'console' at Text-1.txt#1: could not resolve first part of 'console'

Defman21 avatar Apr 06 '15 16:04 Defman21

screenshot

Naatan avatar Apr 06 '15 16:04 Naatan

Are you in a JavaScript file or a html5 file?

Naatan avatar Apr 06 '15 16:04 Naatan

JavaScript.

Defman21 avatar Apr 06 '15 16:04 Defman21

Try deleting your codeintel database from your profile folder?

Naatan avatar Apr 06 '15 16:04 Naatan

ohh I got it. I've enabled Prototype API Catalog and now I can get tooltips for console object

Defman21 avatar Apr 06 '15 16:04 Defman21

I don't have Prototype enabled. I have HTML5 enabled though.

Naatan avatar Apr 06 '15 16:04 Naatan

What API catalogs enabled for you? I cannot get tooltips for console object without Prototype enabled.

[2015-04-06 19:40:53,248] [ERROR] koCodeIntel:     INFO: eval 'console' at Text-1.txt#1  <Trigger 'javascript-complete-object-members' at 8>
    INFO: start scope is (<blob 'Text-1.txt'>, [])
    INFO: find 'console' starting at (<blob 'Text-1.txt'>, [])
    INFO: is 'console' accessible on (<blob 'Text-1.txt'>, [])? no
    INFO: is 'console' accessible on (<blob '*'>, [])? no
    INFO: is 'console' accessible on (<blob '*'>, ['Window'])? no
    INFO: lookup 'console' in <JavaScript curdirlib>
    INFO: lookup 'console' in <JavaScript cataloglib: HTML5, Komodo, XPCOM, jQuery>
    INFO: lookup 'console' in <javascript stdlib>
    ERROR: evaluating 'console' at Text-1.txt#1: could not resolve first part of 'console'

Also I cleaned my codeIntel - didn't help.

Defman21 avatar Apr 06 '15 16:04 Defman21

https://db.tt/NrJgOnmD

Naatan avatar Apr 06 '15 16:04 Naatan

I have HTML5 enabled though.

I to. So now I have no idea what wrong with my settings. I enabled same API catalogs as on your screen - no luck

Defman21 avatar Apr 06 '15 16:04 Defman21

Did you try deleting your codeintel DB?

Naatan avatar Apr 07 '15 16:04 Naatan

Yes.

Defman21 avatar Apr 07 '15 16:04 Defman21

I don't get the console object with or without html5 or prototype catalogs enabled.

th3coop avatar Apr 07 '15 18:04 th3coop

Ok, we'll still need to figure out steps to reproduce but definitely something odd going on here.

Naatan avatar Apr 07 '15 18:04 Naatan

14:19 | Kronuz | hello there 14:22 | Kronuz | hey, who knows any about the console.js in the node.js lib_srcs for 4.4 and 5.9 not having a Console instance there exported? only the Console class? 14:22 | Kronuz | for my autocomplete, "console.<|>" isn't completing properly because the missing Console instance there 15:45 | Defman | Kronuz, why do you need these versions anyway? 15:46 | Defman | I'd go with 6 (because it's LTS) and 8 because it's getting updates 15:47 | Kronuz | Defman, Komodo Editor only has 4.4 and 5.9 lib sources

This might be the problem.

Defman21 avatar Aug 03 '17 16:08 Defman21

This shouldn't be in this ticket, please open a new bug if there's something actionable on our end.

Naatan avatar Aug 03 '17 17:08 Naatan

I get the autocompletions but they are wrong. I'll open a new ticket. EDIT: New ticket: https://github.com/Komodo/KomodoEdit/issues/2755

Defman21 avatar Aug 03 '17 18:08 Defman21

Opps, I get them only in NodeJS, not Javascript.

Defman21 avatar Aug 03 '17 18:08 Defman21

Note: The JavaScript stdlib catalog does not have the "console" object in it. We'll have to figure out a way to programatically add when we generate our stdlib files. This enhancement does not qualify for 11.0.1.

mitchell-as avatar Oct 03 '17 15:10 mitchell-as

I am facing the same problem in Komodo Edit 12 on Windows 10. There is no auto-completion for "console".

aks2161989 avatar May 24 '20 07:05 aks2161989