Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent Request textDocument/documentHighlight failed with message: Debug Failure. False expression. Code: -32603 error when selecting Javascript code in the embedded <script> tag #5975

Conversation

AndrewStopchenko-SO
Copy link
Contributor

@AndrewStopchenko-SO AndrewStopchenko-SO commented Dec 13, 2024

What does this PR do?

Prevent Visualforce Language Server from throwing Request textDocument/documentHighlight failed with message: Debug Failure. False expression. Code: -32603 error when selecting Javascript code in the <script> tag embedded in Visualforce page/component, as described in #5279.

What issues does this PR fix or reference?

Fixes #5279, which is linked to @W-14687315@

Functionality Before

Clicking/selecting any Javascript code's variable/function inside <script> tags on a Visualforce page throws an error, forcing VSCode to switch to the Output panel, "Visualforce Language Server" outputs.

Functionality After

No error occurs, clicked/selected javascript mode's variable/function is highlighted across the Javascript/HTML handlers code.
Please see this comment for the root cause analysis.

== DISCLAIMER: no tests ==

Unfortunately, lacking experience with Typescript/Jest - thus unable to properly test the solution...
Only verified the fix by modifying the compiled {userDir}/.vscode/salesforce.salesforcedx-vscode-visualforce-#/dist/languageserver.js code.

…ht failed with message: Debug Failure. False expression. Code: -32603" error when selecting javascript code in the <script> tag embedded in Visualforce page/component (#5279)
@mingxuanzhangsfdx mingxuanzhangsfdx requested review from mingxuanzhangsfdx and removed request for lahernandezb December 17, 2024 21:55
Copy link
Member

@mingxuanzhangsfdx mingxuanzhangsfdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the change!

@mingxuanzhangsfdx mingxuanzhangsfdx merged commit 1c2f159 into forcedotcom:develop Dec 17, 2024
5 checks passed
@mingxuanzhangsfdx
Copy link
Member

Hi @AndrewStopchenko-SO , we have a moratorium during the holiday week. Your fix will be released next week, thank you for your contribution again!

@AndrewStopchenko-SO AndrewStopchenko-SO deleted the patch-visualforceLanguageServer branch December 31, 2024 14:16
mingxuanzhangsfdx added a commit that referenced this pull request Jan 15, 2025
* docs: update README and developing.md (#5960)

* Update README.md

* Update README.md

* Update developing.md

* chore(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /packages/salesforcedx-utils-vscode (#5949)

* chore(deps): bump cross-spawn in /packages/salesforcedx-utils-vscode

Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: bump cross-spawn to v7.0.6 and @types/cross-spawn to v6.0.6

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daphne Yang <[email protected]>
Co-authored-by: Daphne Yang <[email protected]>

* chore: update to version 62.8.0

* fix: update some md labels for org browser (#5967)

* feat: add missing labels for org browser

* chore: labels missing in japanese file

* chore: update to version 62.9.0

* Mz/disable apex ls error telemetry (#5969)

* feat: add an user setting to disable error to telemetry by default

* chore: fix linting

* chore: updated jar

* chore: update to version 62.9.1

* chore: generated CHANGELOG for release/v62.9.1

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* chore: updated SHA256 v62.9.1 [skip ci]

* chore: update to version 62.10.0

* fix: prevent `Request textDocument/documentHighlight failed with message: Debug Failure. False expression. Code: -32603` error when selecting Javascript code in the embedded `<script>` tag (#5975)

* Visualforce extension - prevent "Request textDocument/documentHighlight failed with message: Debug Failure. False expression. Code: -32603" error when selecting javascript code in the <script> tag embedded in Visualforce page/component (#5279)

* Update packages/salesforcedx-visualforce-language-server/src/modes/javascriptMode.ts

---------

Co-authored-by: Mingxuan Zhang <[email protected]>

* chore: update to version 62.11.0

* chore: update to version 62.12.0

* chore: generated CHANGELOG for release/v62.12.0

* fix: use correct telemetry enable setting (#5986)

* fix: use correct telemetry enable setting

* fix: empty commit to trigger salesforce cla

* fix: empty commit to trigger salesforce cla

* fix: empty commit to trigger salesforce cla

* fix: renaming variables to trigger salesforce cla

* fix: updating the default value to all

---------

Co-authored-by: Madhur Shrivastava <[email protected]>
Co-authored-by: peternhale <[email protected]>

* Update CHANGELOG.md

* Update CHANGELOG.md

Sonal's edits.

* chore: updated SHA256 v62.12.0 [skip ci]

* chore(deps): bump nanoid from 3.3.6 to 3.3.8 (#5973)

Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.6 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.3.6...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cristina Cañizales <[email protected]>

* chore: update to version 62.13.0

* chore: generated CHANGELOG for release/v62.13.0

* fix: fix MD labels in org browser (#5996)

* chore: update changelog

* chore: updated SHA256 v62.13.0 [skip ci]

* fix: excluding schema from bundling to avoid warning (#6000)

* fix: excluding schema from bundling to avoid warning

* fix: excluding schema from bundling to avoid warning

* fix: hide commands outside of forceapp main default (#6003)

* fix: hide commands outside of forceapp main default

* chore: hide in context menu from explorer view

* chore: update to version 62.14.0

* Revert "fix: hide commands outside of forceapp main default (#6003)" (#6004)

This reverts commit 7464a58.

Co-authored-by: peternhale <[email protected]>

* chore: update to version 62.14.1

* chore: generated CHANGELOG for release/v62.14.1

* Update CHANGELOG.md

* chore: updated SHA256 v62.14.1 [skip ci]

* fix: resolve call (#6006)

* chore: dummy

* fix: parameter

* fix: parameter

* chore: revert jorje jar

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Daphne Yang <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daphne Yang <[email protected]>
Co-authored-by: Release Bot <[email protected]>
Co-authored-by: Cristina Cañizales <[email protected]>
Co-authored-by: AndrewStopchenko-SO <[email protected]>
Co-authored-by: madhur310 <[email protected]>
Co-authored-by: Madhur Shrivastava <[email protected]>
Co-authored-by: peternhale <[email protected]>
Co-authored-by: Sonal Budhiraja <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on click in <script> block of a Lightning Apex Page
2 participants