<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Visual Studio Code debug session hangs on stepping over DPC++ function queue(DeviceSelector.sele in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Visual-Studio-Code-debug-session-hangs-on-stepping-over-DPC/m-p/1419984#M2576</link>
    <description>&lt;DIV id="bodyDisplay_0" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation section_selectors" data-section_field_id="58a9-d8aa-c5ee"&gt;
&lt;DIV class="lia-message-body-content sub_section_element_selectors"&gt;
&lt;P class="sub_section_element_selectors"&gt;The Gui debug hang is solved by added the following to the launch.json file:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"setupCommands": [
{
"description": "Disable target async",
"text": "set target-async off",
"ignoreFailures": true
}&lt;/LI-CODE&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 06 Oct 2022 13:13:59 GMT</pubDate>
    <dc:creator>Illya</dc:creator>
    <dc:date>2022-10-06T13:13:59Z</dc:date>
    <item>
      <title>Visual Studio Code debug session hangs on stepping over DPC++ function queue(DeviceSelector.select_d</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Visual-Studio-Code-debug-session-hangs-on-stepping-over-DPC/m-p/1419943#M2573</link>
      <description>&lt;P&gt;&lt;STRONG&gt;OS:&lt;/STRONG&gt; Ubuntu 20.04.5 LTS 64bit&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Platform:&lt;/STRONG&gt; Latitude 7320, 16Gb RAM, Intel i71185G7, GPU Mesa Intel Xe TGLGt2&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Visual Studio Code:&lt;/STRONG&gt; 1.71.2&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Visual Studio Code extensions:&lt;/STRONG&gt; Microsoft C/C++ pack, all Intel oneAPI extension except '&lt;SPAN class="name clickable" title="Extension name"&gt;GDB with GPU Debug Support for Intel® oneAPI Toolkits&lt;/SPAN&gt;'&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Intel oneAPI toolkits:&lt;/STRONG&gt; Base + necessary prerequisites given in the setup instructions&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Context:&lt;/STRONG&gt; Using an Intel oneAPI code example simple-add, a project is setup to build the two code samples buffers and usm. Using the DPC++ compiler to build debug executables (-O0 optimisation), they work and execute as expected. Set up debug session (see launch.json below), the debug sessions using gdb-oneapi can step over or into lines of code in the DPC++ sample using the Visual Studio Code debug panel.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The problem in brief:&lt;/STRONG&gt; Visual Studio Code debug session hangs on stepping over DPC++ function queue(DeviceSelector.select_device(),...).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In detail:&lt;/STRONG&gt; Using the Visual Studio Code debug panel a debug session can proceed through the code stepping over or into functions. When the DPC++ function queue(DeviceSelector.select_device(),...) is reached and stepped into or over, the IDE reports running and hangs, the GUI debug panel is partially ghosted out. The debug session does not continue (or stop at any following break points) and so need to abort the debug session.&lt;/P&gt;
&lt;P&gt;Start a new debug session and again using the debug panel step in or over code to get to the point just before entering the function queue(DeviceSelector.select_device(),...), now type in the debug console terminal gdb command -exec step the code executes. A whole load of threads are reported to be created, and the debug session can continue using the GUI debug panel and the rest of the code can be stepped through as expected.&lt;/P&gt;
&lt;P&gt;Using the gdb-oneapi debugger as a stand alone session from a terminal window, debugging works as expected, no hanging.&lt;/P&gt;
&lt;P&gt;Not able to step in the DPC++ function select_device() and any deeper whole debugging by any debug method, as only have the DPC++ header files.&lt;/P&gt;
&lt;P&gt;Injecting a gdb command from the debug console window should not be required to achieve a successful debug session.&lt;/P&gt;
&lt;P&gt;Is this a problem with gdb-oneAPI and or Visual Studio Code?&lt;/P&gt;
&lt;P&gt;The launch.json for the project is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
"name": "C/C++: dpc++ build and debug simple-add-usm",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/${config:programNameUsm}_d",
"args": [],
"stopAtEntry": true,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "simple-add-usm Debug C/C++: dpcpp build active file",
"miDebuggerPath": "/opt/intel/oneapi/debugger/latest/gdb/intel64/bin/gdb-oneapi"
},
{
"name": "C/C++: dpc++ build and debug simple-add-buffers",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/${config:programNameBuffers}_d",
"args": [],
"stopAtEntry": true,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "simple-add-buffers Debug C/C++: dpcpp build active file",
"miDebuggerPath": "/opt/intel/oneapi/debugger/latest/gdb/intel64/bin/gdb-oneapi"
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 09:10:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Visual-Studio-Code-debug-session-hangs-on-stepping-over-DPC/m-p/1419943#M2573</guid>
      <dc:creator>Illya</dc:creator>
      <dc:date>2022-10-06T09:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Code debug session hangs on stepping over DPC++ function queue(DeviceSelector.sele</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Visual-Studio-Code-debug-session-hangs-on-stepping-over-DPC/m-p/1419984#M2576</link>
      <description>&lt;DIV id="bodyDisplay_0" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation section_selectors" data-section_field_id="58a9-d8aa-c5ee"&gt;
&lt;DIV class="lia-message-body-content sub_section_element_selectors"&gt;
&lt;P class="sub_section_element_selectors"&gt;The Gui debug hang is solved by added the following to the launch.json file:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"setupCommands": [
{
"description": "Disable target async",
"text": "set target-async off",
"ignoreFailures": true
}&lt;/LI-CODE&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Oct 2022 13:13:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Visual-Studio-Code-debug-session-hangs-on-stepping-over-DPC/m-p/1419984#M2576</guid>
      <dc:creator>Illya</dc:creator>
      <dc:date>2022-10-06T13:13:59Z</dc:date>
    </item>
    <item>
      <title>Re:Visual Studio Code debug session hangs on stepping over DPC++ function queue(DeviceSelector.select_d</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Visual-Studio-Code-debug-session-hangs-on-stepping-over-DPC/m-p/1420263#M2579</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved. Thanks for sharing the solution with us. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Oct 2022 12:29:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Visual-Studio-Code-debug-session-hangs-on-stepping-over-DPC/m-p/1420263#M2579</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2022-10-07T12:29:20Z</dc:date>
    </item>
  </channel>
</rss>

