question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Functions disappear when regions are not properly closed

See original GitHub issue
Version: 1.37.0-insider (user setup)
Commit: 0bd57ac9efae79f9eb1aedc3818ebbb570b9bf6b
Date: 2019-08-02T21:22:13.578Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 6.2.9200

Consider the following code:

Function Test-Stuff_1 {
    #region Description

    #region MISSING END REGION SECTION
    #endregion
}

Function Test-Stuff_2 {
    # Function not visible
}

Function Test-Stuff_3 {
    # Function not visible

    #Delete ticket

    #endregion
}

Function Test-Stuff_4 {
    # Function visible
}

When you select FOLD ALL or press CTRL+K and CTRL+0 you’ll see that two functions are no longer visible: image

This made me freak out at first as I thought I’d lost some of my code. The scope for checking opening and closing regions should be limited to the function itself.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
corbobcommented, Aug 7, 2019

But Regions aren’t a part of the language. They’re there to help the developer group things together and collapse things they don’t want to see in the moment. It’s not for the extension to decide if someone’s region layout makes sense.

Further: this is the same behavior you see with the ISE when you minimize the regions: image

1reaction
rjmholtcommented, Aug 6, 2019

There’s no reason a region can’t start in one function and end in another. In a case like this, if we take an opinion on how bad input works, it will probably break another use case. Comparing this with something like HTML, if you don’t close a tag, everything is subordinate to that, so I think we’re consistent there and this is working by design.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Functions disappear from app after arm template deploy #8189
Actual behavior. The setting WEBSITE_RUN_FROM_PACKAGE is reset to 1 and the functions disappear from the app.
Read more >
Why would my Function disappear from the Portal App?
Symptoms: Functions look to have disappeared. Function App FQDN not reachable (http 502) Kudu working, but no files in root.
Read more >
The function disappear close to zero - gnuplot - Stack Overflow
I have problem with plotting fitted function. The part of the ploted function close to zero disappears and connected with the hyperbola or ......
Read more >
Troubleshoot deployment issues in Lambda
When you upload a function's deployment package from an Amazon S3 bucket, the bucket must be in the same Region as the function....
Read more >
Split, Erase and Erase Outside function causes the Target ...
Learn how to resolve issue where the Split, Erase and Erase Outside function causes the Target region it disappear in MapInfo Professional. Oct...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found