Open
Description
Issue Type: Bug
The included Program has a class property who's getter accesses a postgres database.
Steps:
- put a breakpoint on the Console.WriteLine... line
- run debugger
- if stopped, hover the mouse over the demo symbol
- the debugger will try to display the value of demo.ClientId and thereby terminate the debugged process.
Error Message: The target process exited with code 0 while evaluating the function 'crash_demo.Program.CrashDemo.ClientId.get'.The program '[893707] crash-demo.dll' has exited with code 0 (0x0). - might have to do with the native call that occurs while evaluation the prop
using System.Data;
using System;
using Npgsql;
namespace crash_demo
{
class Program
{
static void Main(string[] args)
{
CrashDemo demo = new CrashDemo();
Console.WriteLine("ClientIs is " + demo.ClientId);
}
public class CrashDemo
{
public string ClientId
{
get
{
string clientId = string.Empty;
using (IDbConnection connection = GetConnection())
{
IDbCommand dbCommand = connection.CreateCommand();
dbCommand.CommandType = CommandType.Text;
dbCommand.CommandText = @"select client_id from clients where kdnr = '123456'";
IDataReader reader = dbCommand.ExecuteReader();
if (reader.Read())
{
clientId = (string)reader["client_id"];
}
reader.Dispose();
return clientId;
}
}
}
IDbConnection GetConnection()
{
IDbConnection connection = new NpgsqlConnection();
connection.ConnectionString = "Host=127.0.0.1;Username=stocks;Database=stocks";
connection.Open();
return connection;
}
}
}
}
VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:52:11.516Z)
OS version: Linux x64 5.5.10-200.fc31.x86_64
System Info
Item | Value |
---|---|
CPUs | Intel Core Processor (Skylake, IBRS) (3 x 2207) |
GPU Status | 2d_canvas: unavailable_software flash_3d: unavailable_off flash_stage3d: unavailable_off flash_stage3d_baseline: unavailable_off gpu_compositing: unavailable_off multiple_raster_threads: disabled_off oop_rasterization: unavailable_off protected_video_decode: unavailable_off rasterization: unavailable_off skia_renderer: disabled_off_ok video_decode: unavailable_off viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off_ok webgl: enabled_readback webgl2: unavailable_off |
Load (avg) | 1, 1, 1 |
Memory (System) | 7.77GB (3.30GB free) |
Process Argv | --no-sandbox |
Screen Reader | no |
VM | 0% |
Extensions (8)
Extension | Author (truncated) | Version |
---|---|---|
vscode-css-formatter | aes | 1.0.1 |
vs-code-xml-format | fab | 0.1.5 |
vscode-firefox-debug | fir | 2.7.1 |
auto-using | Fud | 0.7.15 |
csharp | ms- | 1.21.16 |
mono-debug | ms- | 0.15.8 |
debugger-for-chrome | msj | 4.12.6 |
vscode-gitignore-generator | pio | 1.0.1 |