# VS Code semicolon at the end of commented line

**URL:** <https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195>\
**Category:** General Usage\
**Tags:** vscode\
**Created:** [March 29, 2021, 10:15pm UTC](https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195 "2021-03-29T22:15:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [March 29, 2021, 10:15pm UTC](https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195/1 "2021-03-29T22:15:53Z")

</div>

Minor thing but nevertheless surprising at first sight: is the following a bug in Julia VS Code extension or a feature?

```julia
# VS Code 1.54.3 Win10; Julia extension 1.1.38

b = 1 # CTRL + ENTER shows value in terminal

# Nothing prints out for next line commented with semicolon at the end
b = 1 # note;

```

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [March 29, 2021, 10:41pm UTC](https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195/2 "2021-03-29T22:41:56Z")

</div>

Never mind, the REPL has the same behavior…

---

<div class="post-metadata">

**Author:** ![apo383](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/apo383/32/11272_2.png) [@apo383](https://discourse.julialang.org/u/apo383)\
**Post date:** [March 29, 2021, 11:27pm UTC](https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195/3 "2021-03-29T23:27:50Z")

</div>

Yes but seems like a bug in the REPL. I’m not sure where VS Code draws the line between itself and REPL, so there may be a bug there too.

EDIT: Yup, looks like a bug:

```julia
julia> import REPL.ends_with_semicolon

julia> ends_with_semicolon("a = 1 #;")
true

```

Seems like it includes a “comment parser” but fails in this case.  
[https://github.com/JuliaLang/julia/blob/f9720dc2ebd6cd9e3086365f281e62506444ef37/stdlib/REPL/src/REPL.jl#L1154-L1164](https://github.com/JuliaLang/julia/blob/f9720dc2ebd6cd9e3086365f281e62506444ef37/stdlib/REPL/src/REPL.jl#L1154-L1164)

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [March 30, 2021, 5:50am UTC](https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195/4 "2021-03-30T05:50:54Z")

</div>

I think I observed the same in jupyter the other day, where I commented out the last line of a cell which has a semicolon at the end and the output was still surpressed
