-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Create Definition on a constructor in a header isn't working #10463
Comments
@H-G-Hristov I'm not reproing the bug, so we may need more repro details. Can you provide a code sample that repros it, i.e. what are the contents of the source and header files? And the OS. Also, we're still working on adding better error logging, so once that's added the logging might show a more helpful error. |
@sean-mcmanus The OS is as usual macOS. The project is my usual Cmake based project. I'll see if I can provide some repro but I can't promise. |
@H-G-Hristov Our pending 1.14.2 pre-release will have error logging added. The OS isn't expected to matter, neither is the build system. It sounds like you're saying it might not repro in a simpler project. |
For example for this header I am unable to get the extension to generate definitions: #pragma once
#include <nblib/logger/ILogger.hpp>
#include "register-with-server/macOS/IAdmInstallUserDataPlist.hpp"
namespace nbnc::register_with_server {
class AdmInstallUserDataPlist : public IAdmInstallUserDataPlist
{
public:
AdmInstallUserDataPlist();
explicit AdmInstallUserDataPlist(const ::nblib::utilities::ILogger& logger);
~AdmInstallUserDataPlist();
public:
[[nodiscard]] bool IsValid() const noexcept override;
tl::expected<void, std::string> LoadFromFile(std::string_view filepath) override;
public:
[[nodiscard]] virtual tl::expected<Configuration, std::string> GetConfiguration() const override;
public:
[[nodiscard]] virtual tl::optional<std::string> GetActivationKey() const noexcept override;
[[nodiscard]] virtual tl::optional<std::string> GetADID() const noexcept override;
[[nodiscard]] virtual tl::optional<std::int64_t> GetCustomerID() const noexcept override;
[[nodiscard]] virtual tl::optional<std::string> GetCustomerName() const noexcept override;
[[nodiscard]] virtual tl::optional<std::string> GetRegistrationToken() const noexcept override;
[[nodiscard]] virtual tl::optional<std::string> GetServerURLs() const noexcept override;
[[nodiscard]] virtual tl::optional<std::string> GetProxyURL() const noexcept override;
private:
class Implementation;
private:
std::unique_ptr<Implementation> impl;
const ::nblib::utilities::ILogger& logger;
};
} // namespace nbnc::register_with_server |
@H-G-Hristov 1.14.2 has error logging added -- https://github.com/microsoft/vscode-cpptools/releases/tag/v1.14.2 -- do you get any error message with that? |
That is strange. I'm not reproing it still and it looks like you're not getting an error (I think we show an error message in addition to in the log output). It seems like something is causing us to fail to locate the test.cpp or make edits to it (but I tried that and I get an error message if the file can't be found). Could this be a permissions issue? Do clang-tidy fix code actions work? e.g. int foo()
{
int i;
return 0;
} |
Could the yellow squiggle on the "once" be relevant? That seems like it might be a clang-tidy warning. |
Could this be related:
|
I have no idea what exactly is causing this warning and how to fix it. According to I am using Cmake: add_executable(T
main.cpp
test.cpp
# test.hpp
) |
I can confirm that generally clang-tidy fixes work unless when Clang-Tidy gets stuck and requires VSCode to be restarted but that's a different issue which I reported before. |
@H-G-Hristov The The IntelliSense process crash might be interfering with create declaration/definition. I don't understand how you're getting a crash on such a simple header file though. Are you able to get it to not crash? Or can you comment out the code, attach a debugger to cpptools-srv, then uncomment out the code to get a crash call stack, i.e. https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv |
Regarding the last part (attach a debugger) is this still an issue on macOS: #9810 |
@H-G-Hristov Oh, yeah, I didn't realize you were on Mac. Yeah, there might be blocking issues attaching a debugger on Mac. Some Macs are configured to be able log crashes to a text file in a particular crash diagnostics folder, but I'm not sure how to enable that. |
I'd appreciate that. |
Hey @michelleangela, this issue might need further attention. @sean-mcmanus, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
This issue has been closed because it needs more information and has not had recent activity. |
Nothing happens and I also don't see any messages in the C++ log.
Originally posted by @H-G-Hristov in #10189 (comment)
The text was updated successfully, but these errors were encountered: