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

Debugger in CLion is inconsistent if displaying proper values for string variables #27

Open
quaesitor-scientiam opened this issue Jan 24, 2025 · 0 comments

Comments

@quaesitor-scientiam
Copy link

Describe the bug

Step debugging after function was processed. Debugger not showing proper values for string variables

Expected Behavior

Show proper values after function completion

Current Behavior

Image

Image

Reproduction Steps

Run this code set breakpoint

module main

import net.http
import x.json2
import os

const (
	linux = 'selenium-manager-linux'
	macos = 'selenium-manager-macos'
	windows = 'selenium-manager-windows.exe'
)

const download_names = [linux, macos, windows]

fn fetch_release(baseurl string) !string {
	mut response := ''
	mut url := baseurl.clone()
	url += 'latest'
	resp := http.fetch(url: url, header: http.new_header_from_map({.accept: 'application/json'})) or {
		println(err)
		exit(1)}
	if resp.status() == .ok {
		decoded := json2.decode[json2.Any](resp.body)!.as_map()
		response = decoded['tag_name'].str()
	}
	return response
}

fn main() {
	baseurl := 'https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/'
	download_url := baseurl + 'download/'
	mut url := download_url + fetch_release(baseurl) or {println(err)
			exit(1)}

	for name in download_names {
		url = url + '/' + name
		fname, folder := name.rsplit_once('-')?
		println('fname ${fname}  folder ${folder}')
		println(url)
		// mut downloader := http.SilentStreamingDownloader {url: url}
		// downloader.path = os.getwd()

	}
}

Possible Solution

A working debugger

Additional Information/Context

No response

Environment details (v doctor output)

PS S:\> v doctor
|V full version      |V 0.4.9 45fd7eb.25d60ba
|:-------------------|:-------------------
|OS                  |windows, Microsoft Windows 11 Pro 26100 64-bit
|Processor           |24 cpus, 64bit, little endian, AMD Ryzen 9 5900X 12-Core Processor
|Memory              |106.35GB/127.92GB
|                    |
|V executable        |S:\repo\vlang\v.exe
|V last modified time|2025-01-23 15:31:18
|                    |
|V home dir          |OK, value: S:\repo\vlang
|VMODULES            |OK, value: C:\Users\john3\.vmodules
|VTMP                |OK, value: C:\Users\john3\AppData\Local\Temp\v_0
|Current working dir |OK, value: S:\
|                    |
|Git version         |git version 2.45.1.windows.1
|V git status        |weekly.2025.03-66-g25d60bad (1 commit(s) behind V master)
|.git/config present |true
|                    |
|cc version          |N/A
|gcc version         |gcc (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r2) 14.2.0
|clang version       |(built by Brecht Sanders, r2) clang version 19.1.1
|msvc version        |N/A
|tcc version         |tcc version 0.9.27 (x86_64 Windows)
|tcc git status      |thirdparty-windows-amd64 b425ac82
|emcc version        |N/A
|glibc version       |N/A

IDE Type (IDEA Community/Ultimate, GoLand, CLion, etc.)

CLion 2024.3.2
Build #CL-243.23654.114, built on January 15, 2025
Licensed to Richard Wheeler
Subscription is active until December 15, 2025.
For educational use only.
Runtime version: 21.0.5+8-b631.30 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
.NET Core v8.0.11 x64 (Server GC)
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 24
Registry:
  actionSystem.update.actions.warn.dataRules.on.edt=false
  debugger.new.tool.window.layout=true
  debugger.attach.dialog.enabled=true
  run.processes.with.pty=TRUE
  ide.experimental.ui=true
  ide.slow.operations.assertion=false
  cache.folding.model.on.disk=false
  terminal.new.ui=true
  llm.show.ai.promotion.window.on.start=false
Non-Bundled Plugins:
  Batch Scripts Support (1.0.13)
  com.jetbrains.space (243.23654.19)
  io.vlang (2024.3.1)

Plugin Version

2024.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant