Skip to content

Print Statement : snippet shortcuts don't work #3694

@mickey263

Description

@mickey263

Hello !

I'm a french user of komodo and i apologize in advance for my language mistakes.

Short Summary

I have import the "Print Debugging" folder from \AppData\Local\ActiveState\KomodoIDE\11.1\samples\tools in my toolbox.
when i use "CTRL+Click" in the margin, the printdebug snippet add "puts "[[%t]]"" in my TCL code.

The [[%t]] shortcut isn't replaced by the previous line.
I test with a PHP file, [[%t]] is replaced but with nothing (echo "";)

I check with text selection, with all text and selection shortcut for the same result.
Other shortcuts like date or path works.

When i spot the cursor on the end of a line and double-click on the "Tcl Print Statement", it works but with no line break.
When i reproduce this test on the next line, the shortcut is replaced by nothing.

Steps to Reproduce

CTRL-Click on margin.

Expected results

1 set foo 1
2 puts "set foo 1"

Actual results

1 set foo 1
2 puts "[[%t]]"

Platform Information

Komodo Edit or IDE? IDE
Komodo Version? 11.1.0 build 91033
Operating System (and version)? Win 7 Professionnal SP1 32 bits ; platform win32-86

Additional Information

thx for the support

Logs

[2019-02-25 12:59:38,348] [WARNING] peSnippet: Could not perform interpolation: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [koIInterpolationService.Interpolate1]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://komodo/content/run/interpolate.js :: Interpolate_interpolate :: line 348"  data: no]
[2019-02-25 12:59:48,588] [ERROR] run: The command string includes %t, but there is no current file, or content in the line.
Traceback (most recent call last):
  File "C:\Users\cgcho\Komodo IDE 11.1.1\lib\mozilla\components\koRunService.py", line 673, in Interpolate1
    indentReplacement=True)
  File "C:\Users\cgcho\Komodo IDE 11.1.1\lib\mozilla\components\koRunService.py", line 590, in _doInterpolate1
    raise replacement
ValueError: The command string includes %t, but there is no current file, or content in the line.
[2019-02-25 12:59:48,588] [ERROR] run: 2147942487 (The command string includes %t, but there is no current file, or content in the line.)
Traceback (most recent call last):
  File "C:\Users\cgcho\Komodo IDE 11.1.1\lib\mozilla\components\koRunService.py", line 681, in Interpolate1
    ex.args[0])
ServerException: 2147942487 (The command string includes %t, but there is no current file, or content in the line.)
[2019-02-25 12:59:48,589] [ERROR] interpolate: 
-- EXCEPTION START --
[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [koIInterpolationService.Interpolate1]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://komodo/content/run/interpolate.js :: Interpolate_interpolate :: line 348"  data: no]
+ toString (function) 3 lines
+ message (string) 'Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [koIInterpolationService.Interpolate1]'
+ result (number) 2147942487
+ name (string) 'NS_ERROR_ILLEGAL_VALUE'
+ filename (string) 'chrome://komodo/content/run/interpolate.js'
+ lineNumber (number) 348
+ columnNumber (number) 0
+ inner (object) null
| + data (object) null
| + stack (string) 'Interpolate_interpolate@chrome://komodo/content/run/interpolate.js:348:0
snippetInsertImpl@chrome://'...448 chars
+ location (object) JS frame :: chrome://komodo/content/run/interpolate.js :: Interpolate_interpolate :: line 348
| + QueryInterface (function) 3 lines
| + language (number) 2
| + languageName (string) 'JavaScript'
| + filename (string) 'chrome://komodo/content/run/interpolate.js'
| + name (string) 'Interpolate_interpolate'
| + lineNumber (number) 348
| + columnNumber (number) 0
| + sourceLine (string) ''
| + caller (object) JS frame :: chrome://komodo/content/project/peSnippet.js :: snippetInsertImpl :: line 325
| + formattedStack (string) 'Interpolate_interpolate@chrome://komodo/content/run/interpolate.js:348:0
snippetInsertImpl@chrome://'...448 chars
| + stack
    Interpolate_interpolate@chrome://komodo/content/run/interpolate.js:348:0
    snippetInsertImpl@chrome://komodo/content/project/peSnippet.js:325:17
    Printdebug_insert@chrome://komodo/content/project/pePrintdebug.js:100:37
    this.enable@chrome://komodo/content/sdk/simpledebug.js:293:12
    this.toggle@chrome://komodo/content/sdk/simpledebug.js:252:12
    _onMarginClick@viewbufferbase:1512:20
    onMarginClick@viewbufferbase:1454:12
    onMarginClick@vieweditor:2253:22
-- EXCEPTION END --

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions