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.

Does not work for default console application

See original GitHub issue

Step to reproduce: 1 VS File->New->Project->Console application 2. Select Solution/Project/File, Clang Power Tools->Compile Bug: Start Clang Compile

C:\Users\Mariusz\AppData\Local\Microsoft\VisualStudio\15.0_a46b25cb\Extensions\jdeqctnp.s5e\clang-build.ps1 : Cannot 
bind argument to parameter 'aDirectory' because it is an empty string.
At line:1 char:537
+ ... e') -Verbose -parallel -vs-ver 2017 -vs-sku Community -dir '' -litera ...
+                                                                ~~
    + CategoryInfo          : InvalidData: (:) [clang-build.ps1], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,clang-build.ps1
 

Done Clang Compile

Comments:

  1. According to https://github.com/Caphyon/clang-power-tools/issues/104. I do not see command line for calling clang-build.ps1
  2. I have seen command line for my other project:
VERBOSE: clang-build.ps1 invocation args: 
  aVcxprojToCompile = G:\test\LibWin10.vcxproj 
  aCppToCompile = AdmobHelper.cpp 
  aVcxprojConfigPlatform = Release|x64 
  aClangCompileFlags = -Werror -std=c++14 -Wall -fms-compatibility-version=19.10 -fms-compatibility -Wmicrosoft 
-Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-value 
  Verbose = True 
  aUseParallelCompile = True 
  aVisualStudioVersion = 2017 
  aVisualStudioSku = Community 
  aDirectory = G:\test 
  aDisableNameRegexMatching = True 

But I do not know how to use it. I would like to just copy clang-build.ps1 command line from Visual Studio output and use it… I would like to see something like below visual studio output:

====Call clang-build.ps1:
C:\Users\Mariusz\AppData\Local\Microsoft\VisualStudio\15.0_a46b25cb\Extensions\jdeqctnp.s5e\clang-build.ps1 param1 param2 param2
.......

===== Call clang.exe
C:\path\clang.exe params

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
mariusz102102commented, Nov 28, 2017

The PS script didn’t reach the point where it would print that command-line because it failed to create the PCH file, due to the UTF-16 stdafx.h file.

I think that command line should be displayed to output before is called. And in case compiling PCH and cpp it will be nice do display both command lines

1reaction
mariusz102102commented, Nov 28, 2017

Yes. It think that VS extension itself should print the clang-build.ps1. Only in that place we really know what we are calling.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code Not Running Default C# Console App
So, default program built with dotnet new console -o app , doesn't run in Visual Studio Code. Got the .NET SDK installed, and...
Read more >
Can't set Windows Terminal as default because it is not ...
Open Windows Terminal. Click the menu button and select the Settings option. Click on Startup. Use the “Default terminal application” setting ...
Read more >
C# console app template generates top-level statements
The .NET 6+ project template for C# console apps uses top-level statements. Understand what changed and how to use existing learning ...
Read more >
Terminal window/tab is not closed when console ...
On windows 11, with the windows terminal being set as the default console application, start a program that was compiled for the console ......
Read more >
[Windows 11 22000.65] Default Terminal does not work ...
Set Terminal Preview as default terminal application but Console Host is used when running Command Prompt or Powershell.
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